ch4. Permissions & Ownership Flashcards
ls -l
Bash command to list files and directories in present working directory in descriptive format, including: the permission string, (find the rest)
. (in a file system)
self directory
.. (in a file system)
parent directory
Anatomy of a permission string
11 characters
1st char is ‘d’ for directory or ‘-‘ for file
2nd, 3rd, 4th chars are the owner’s absolute permissions
5th, 6th, 7th chars are the group’s absolute permissions
8th, 9th, 10th chars are the other’s absolute permissions
11th char is SELinux security context +Alternative access methods
what command can also be used to modify the permissions of a file or directory?
chmod
-c
-f
-v
-R
(get descriptions for these options)
what are symbolic permissions?
way to add or subtract permissions without looking at the absolute value of the permissions (probably expand on this?)
what are absolute permissions?
Solve some made up absolute permissions
(advanced) Solve some made up permissions strings
1 = execute
2 = write
3 = write, execute
4 = read
5 = read, execute
6 = read, write
7 = read, write, execute
umask
umask -S
umask -p
(I don’t think this is a Bash command. I think this is a programing function that some Bash commands implement, like mkdir)
used to set the default permissions for newly created files and directories
-S umask as a symbolic value
-p umask as an absolute value
chown
used to change the owner, group, or both of a file or directory
chown syntax
chown [user name] : [group name] [file/directory name]
if you don’t wish to change the owner or the group, just leave the unchanged blank like:
chown [user name] : [file/directory name]
to only change the owner, or
chown : [group name] [file/directory name]
to only change the group name
chgrp
Bash command (find) I think to reassign the group of a file or directory
ls -ld
Bash command to print the permissions of the current working directory
SUID
?
SGID
?
sticky bit
flags a file so that only an owner of the stick bit’s file or directory or the root user can delete the file