File Permissions Flashcards
For ‘chmod’, what is the difference between ‘x’ and ‘X’?
■ ‘x’ sets the execute bit on a file
■ ‘X’ sets the execute bit on a directory or a file that has the execute bit
Who is allowed to change the ownership of a file?
■ Only root can change the ownership of a file. Group ownership can be set by either the file owner or root.
What does the ‘setuid’ (suid) (+s) mean on an executable file?
■ ‘setuid’ causes the file to be executed as the user (owner) of the file and not as the user that ran the command.
What does the ‘setgid’ (sgid) (+s) mean on an executable file?
■ ‘setgid’ causes the file to be executed as the group owner of the file and not as the user that ran the command.
■ Files newly created in the directory have their group owner set to match the group owner of the directory.
What does the ‘sticky bit’ mean on a directory?
■ It means only the file owner and root can change/delete a file. Users have no change/delete rights to files not their own.
What does the command ‘umask’ do?
■ Set the permissions for newly created files and directories.
Where are the default system ‘umask’ values set?
■ /etc/profile
■ /etc/bashrc
What files must a user edit to change their own ‘umask’?
■ .bash_profile
■ .bashrc
How are ACL settings indicated on a file or directory?
■ ‘+’ is appened to the permissions column
■ Example: -rwxrw—-+
Which set of permissions are shown when ACL settings are set?
■ ACL settings instead of traditional POSIX settings.
Whom does the ACL mask affect?
■ The ACL mask defines the maximum permissions that can be granted to ‘named users’, the ‘group-owner’, and ‘named groups’. It does not restrict the permissions of the ‘file owner’ or ‘other’ users.