Chapter 7 File Permissions Flashcards

(17 cards)

1
Q

Command to change ownership of file for a group

A

$ chgrp

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

In Linux, a file also refers to a __________.

A

directory

A directory is a file with associative relationships.

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

What are the three levels of permissions for files in Linux?

A
  • Read
  • Write
  • Execute

These permissions determine what actions users can perform on files and directories.

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

The Read permission allows a user to __________.

A

see the contents of the file

For directories, it allows seeing the list of files.

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

The Write permission allows a user to __________.

A

modify the contents of the file

For directories, it allows creating or deleting files.

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

The Execute permission allows a user to __________.

A

run the file like a command

For directories, it allows the user to go inside the directory.

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

To view detailed information about a directory, use the command: __________.

A

$ ls -ld

This command shows the permissions and ownership of the directory.

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

In Linux, each file has three owners: User, Group, and __________.

A

Others

This categorization helps manage file permissions.

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

The command to change permissions of a file is __________.

A

chmod <option> <filename></filename></option>

Options can be symbolic or octal.

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

What does the command ‘chmod u+x box’ do?

A

Adds execute permission for the user on the file ‘box’

This is an example of a symbolic permission change.

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

The octal value for read, write, and execute permissions is __________.

A

4 for read, 2 for write, 1 for execute

These values are used to calculate permissions in octal format.

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

To change the user owner of a file, the command is __________.

A

chown <username> <filename></filename></username>

This command changes the ownership of the specified file.

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

True or false: Changing ownership of a directory automatically changes the ownership of its contents.

A

FALSE

To change contents and subdirectories, use the recursive option: -R.

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

The default file permissions for newly created files are typically represented as __________.

A

r w - r - - r - -

This indicates the default permissions for user, group, and others.

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

The command to change the default mask for file permissions is __________.

A

umask <value></value>

This command sets the default permissions for newly created files.

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

What does the special permission ‘sticky’ do?

A

Users can only delete or change files they own

This applies even if they have write permissions via group or other.

17
Q

To add a sticky bit to a directory, the command is __________.

A

chmod o+t <directory></directory>

This prevents users from deleting files they do not own.