MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

UNIX

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
A file named employees.odt has a mode of rw-r ____ r ____ If mhuffman is not the file’s owner but is a member of the group that owns this file, what can he do with it?
A
He can open the file and view its contents, but he can’t save any changes.
B
He can open the file, make changes, and save the file.
C
He can change ownership of the file.
D
He can run the file if it’s an executable.
Explanation: 

Detailed explanation-1: -odt has a mode of rw-r–r–. If mhuffman is not the file’s owner but is a member of the group that owns this file, what can he do with it? He can open the file and view its contents, but he can’t save any changes.

Detailed explanation-2: -Type chmod permissions file to change permissions of a file or directory.

Detailed explanation-3: -In the example-rw-r–r–, the owner permissions are rw-, indicating that the owner can read and write to the file but can’t execute it as a program. In the example drwxr-xr-x, the owner permissions are rwx, indicating that the owner can view, modify, and enter the directory.

Detailed explanation-4: -Execute permission allows the user to enter the directory and access any subdirectories.

Detailed explanation-5: -To remove read and write permissions from foo. txt use the chmod command to take away both the read and write permissions. By typing go-rw, you are telling the system to remove read and write permissions for the group and for others from the file foo. txt.

There is 1 question to complete.