MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

UNIX

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
change permission of a file to rw-r ____ r-x?
A
chmod 546 file
B
chmod 642 file
C
chmod 645 file
D
chmod 655 file
Explanation: 

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

Detailed explanation-2: -The permissions for emptyfile are rw-r–r–, indicating that the owner can read and write this file, everyone can read it, and no one can execute it. The permissions for the directory veggies2 are rwxr-xr-x, indicating that everyone has read and execute permissions, but only the owner can write to it.

Detailed explanation-3: -Changing File Permissions with chmod To change the file permissions using chmod, run chmod <permission> <directory or filename>, swapping in the desired file permissions and the directory or file. The owner can change file permissions for any user, group or others by adding-to remove or + to add certain permissions.

Detailed explanation-4: -644-owner can read/write, group/others can read only. Some directory permission examples: 777-all can read/write/search. 755-owner can read/write/search, others and group can only search.

There is 1 question to complete.