A

Admin • 802.91K Points
Coach

Q. Which of these commands will set the permissions on the file “myfile”: read and write for the owner(user), read for the group and nothing for others?

  • (A) $ chmod 046 myfile
  • (B) $ chmod 640 myfile
  • (C) $ chmod 310 myfile
  • (D) $ chmod rw rw myfile
  • Correct Answer - Option(B)
  • Views: 6
  • Filed under category Linux
  • Hashtags:

Explanation by: Admin
r = permission to read
w = permission to write
x = permission to run
– = 0 permission
With r=4 / w=2 / x=1

$ chmod 640 myfile
$ ls -l myfile
-rw-r----- 1 user1 user1 0 2018-10-29 21:41 myfile

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.