File Permissions Flashcards

1
Q

For ‘chmod’, what is the difference between ‘x’ and ‘X’?

A

■ ‘x’ sets the execute bit on a file

■ ‘X’ sets the execute bit on a directory or a file that has the execute bit

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Who is allowed to change the ownership of a file?

A

■ Only root can change the ownership of a file. Group ownership can be set by either the file owner or root.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What does the ‘setuid’ (suid) (+s) mean on an executable file?

A

■ ‘setuid’ causes the file to be executed as the user (owner) of the file and not as the user that ran the command.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What does the ‘setgid’ (sgid) (+s) mean on an executable file?

A

■ ‘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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What does the ‘sticky bit’ mean on a directory?

A

■ It means only the file owner and root can change/delete a file. Users have no change/delete rights to files not their own.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What does the command ‘umask’ do?

A

■ Set the permissions for newly created files and directories.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Where are the default system ‘umask’ values set?

A

■ /etc/profile

■ /etc/bashrc

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What files must a user edit to change their own ‘umask’?

A

■ .bash_profile

■ .bashrc

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How are ACL settings indicated on a file or directory?

A

■ ‘+’ is appened to the permissions column

■ Example: -rwxrw—-+

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Which set of permissions are shown when ACL settings are set?

A

■ ACL settings instead of traditional POSIX settings.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Whom does the ACL mask affect?

A

■ 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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly