Advanced File Management Review Questions

Q. The output generated by the umask command shows the current user mask in four digits. What is the significance of the left-most digit?

A. The left-most digit has no significance in the umask value.


Q. What would the command find /dev -type c -perm 660 do?

A. The find command provided will find all character device files under /dev with exact permissions of 660.


Q. Default permissions are calculated by subtracting the initial permissions from the umask value. True or False?

A. False. Default permissions are calculated by subtracting the umask value from the initial permission values.


Q. What would be the effect of the sticky bit on an executable file?

A. Nothing. The sticky bit is meant for directories only.


Q. Name the permission classes, types, and modes.

A. Permission classes are user, group, and public; permission types are read, write, and execute; and permission modes are add, revoke, and assign.


Q. Default ACLs are meant for directories only. True or False?

A. True. Default ACLs are meant for directories only.


Q. The default umask for a normal user in bash shell is 0027. True or False?

A. False. The default umask for bash shell users is 0002.


Q. What digit represents the setuid bit in the chmod command?

A. The digit 4 represents the setuid bit.


Q. What would the command chmod g-s file1 do?

A. It would erase the setgid bit from file1.


Q. Sticky bit is recommended for every system directory. True or False?

A. False.


Q. What would the command setfacl -m g:dba:rw file1 do?

A. This command will give the users of the dba group read and write permissions on file1.


Q. The setgid bit enables group members to run a command at a higher priority. True or False?

A. False.


Q. What is the equivalent symbolic value for permissions 751?

A. The equivalent for octal 751 is rwxr-x–x.


Q. What permissions would the owner of the file get if the chmod command is executed with 555?

A. The owner will get read and execute permissions.


Q. What would the find / -name core -ok rm {} \; command do?

A. The find command provided will display all files by the name core in the entire directory hierarchy and ask for removal confirmation as it finds them.


Q. Which special permission bit is set on a directory for team sharing?

A. The setgid bit is set for team sharing.