Managing File Ownership and Permissions Flashcards
1
Q
chown command
A
Change ownership of a file
chown user file
2
Q
chgrp command
A
Change group of a file
chgrp group file
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
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)
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)
6
Q
How to hid a file in Linux
A
Adding (.) in front of a file hides the file
7
Q
As file owner can give permission
A
Only to other users in their group
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
9
Q
Set sticky bit?
A
- chown
- Prefix octal code with 1 (0 off)
- chown o+t (o-t off)
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
11
Q
umask command
A
Used to change the default permission for files and directories at the time of the file’s creation.