Title: Quiz 6 - Permissions
Course: CIS 121: Linux/UNIX I: Fundamentals ~ For IGNITE Review

Q: Write a command to change the permissions on a file called "setme" to include read for everybody on the system, execute for the owner and the group only, and write for just the owner. Use the character method.
A: chmod u=rwx,g=rx,o=r setme / chmod a=r,ug+x,u+w setme
If wrong: The following can be used: chmod u=rwx,g=rx,o=r setme or chmod a=r,ug+x,u+w setme

Q: Write a command to change the permissions on a file called "setme" to include read for everybody on the system, execute for the owner and the group only, and write for just the owner. Use the octal method.
A: chmod 764
If wrong: Using the octal method the following can be used: chmod 764

Q: When a user wants to change the ownership, group and permissions on a file, the order of the commands doesn't matter.
- True
- False
A: False

Q: If you are the owner of a file in your home directory, you can change permissions on that file.
- True
- False
A: True

Q: If you have write and execute permission on a directory that is under your home directory, you can delete all files in that directory, even those owned by someone else.
- True
- False
A: True

Q: If you have write and execute permission on a directory that is under your home directory, you can delete all sub-directories under that directory, even those owned by someone else.
- True
- False
A: False

Q: Write a command to assure that the most rights granted for new files will be read, write and execute for the owner, read and execute for the group and read for the other users.
A: umask 023
If wrong: A command to assure that the most rights granted for new files will be read, write and execute for the owner, read and execute for the group and read for the other users is umask 023

Q: Write a command to remove write and execute permission for everyone but yourself from all files and directories in and under your home directory.
A: chmod -R go-wx ~ / chmod -R go-wx ~/*
If wrong: A command to remove write and execute permission for everyone but yourself from all files and directories in and under your home directory is chmod -R go-wx ~

Q: If you have permissions of 700 on a file, and 775 on the directory that it is in. who can delete the file?
A: Owner and group / Only Owner and group
If wrong: Only Owner and group

Q: If umask is set to 027 and fileX has permissions of 754, what are the permissions of a new file that is created when you copy fileX? Just list the permissions in octal.
A: 750 / 0750