MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

UNIX

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
You need to change the permissions of a file named schedule.odt such that the file owner can edit the file, users who are members of the group that owns the file can edit it, and users who are not owners and don’t belong to the owning group can view it but not modify it. Which command will do this?
A
chmod 664 schedule.odt
B
chmod 555 schedule.odt
C
chmod 777 schedule.odt
D
chmod 644 schedule.odt
Explanation: 

Detailed explanation-1: -Change file permissions To change file and directory permissions, use the command chmod (change mode). The owner of a file can change the permissions for user ( u ), group ( g ), or others ( o ) by adding ( + ) or subtracting (-) the read, write, and execute permissions.

Detailed explanation-2: -The chmod command enables you to change the permissions on a file. You must be superuser or the owner of a file or directory to change its permissions.

Detailed explanation-3: -Write permission When files have write permissions, the user can modify (edit, delete) the file and save it. For folders, write permissions enable a user to modify its contents (create, delete, and rename the files inside it), and modify the contents of files that the user has write permissions to.

There is 1 question to complete.