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 rtracy is the file’s owner, 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: -A file named employees. odt has a mode of rw-r–r–. If rtracy is the file’s owner, 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: -We can use the ‘chmod’ command which stands for ‘change mode’. Using the command, we can set permissions (read, write, execute) on a file/directory for the owner, group and the world.

There is 1 question to complete.