Managing File Ownership and Permissions Flashcards

1
Q

chown command

A

Change ownership of a file
chown user file

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

chgrp command

A

Change group of a file
chgrp group file

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

Sticky Bit

A

Special flag on a directory, so a user may only delete their own files or files stored in a directory

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

Set User ID (SUID)

A
  • Special permission bit
  • Tells Linux to run the program with root permissions
  • Indicated by an S in the owner’s execute permission bit (rws instead of rwx)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Set Group ID (SGID)

A
  • Special permission bit
  • Set the group of the running program to the group of the file
  • Indicated by an S in the group execute permission bit (rws instead of rwx)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How to hid a file in Linux

A

Adding (.) in front of a file hides the file

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

As file owner can give permission

A

Only to other users in their group

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

ls -l file

A

List contents of a directory plus:

  • Permissions
  • Number of links
  • Username
  • Group name
  • File size
  • Time stamp
  • File name
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Set sticky bit?

A
  • chown
  • Prefix octal code with 1 (0 off)
  • chown o+t (o-t off)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Set SUID or SGID with Octal Code

A
  • Proceed wtih 2, 4, or 6
  • 2 = SGID (group)
  • 4 = SUID (owner)
  • 6 = Both
  • 4766
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

umask command

A

Used to change the default permission for files and directories at the time of the file’s creation.

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