Which permissions are set on a regular file once the permissions have been modified with the command chmod 654 file.txt?
Which permissions are set on a regular file once the permissions have been modified with the command chmod 654 file.txt?
The command 'chmod 654 file.txt' sets the permissions for a regular file where: 6 represents read and write permissions for the owner, 5 represents read and execute permissions for the group, and 4 represents read permission for others. The correct representation of these permissions is '-rw-r-xr--'.
E. -rw-r-xr-- -> equal 645 not 654
rw = Read & Write for Owner r-x = Read & Execute for Group r = Only read for others
The question is worded incorrectly it SHOULD be 645; but getting that corrected is a whole other issue I guess. 0: (000) No permission. 1: (001) Execute permission. 2: (010) Write permission. 3: (011) Write and execute permissions. 4: (100) Read permission. 5: (101) Read and execute permissions. 6: (110) Read and write permissions. 7: (111) Read, write, and execute permissions.
It’s a file so immediately look for (-) at the beginning. (d) is a directory and (l) is symbolic link.
654 is correct. Just did it in a terminal and got -rw-r-x-r--
user = rw group=r-x others=r
E -rw-r-xr-- is correct. If this were asking about a directory, then 'A' would be the correct answer as the 'd' at the beginning of the permissions string denotes Directory.
E. -rw-r-xr--