File and Directory Permissions Flashcards
1
Q
What command is used to change file owner and group?
A
chown
-R option can be used to change files and directories recursively
2
Q
What command used to change group ownership but leave user ownership unchanged
A
chgrp
-R option to do this recursively
3
Q
Command to change file mode bits (permissions)
A
chmod
- symbolic mode permissions rwx
octal mode read (4) write (2) and execute (1)
4
Q
How to remove a read permission from other?
A
chmod o-r test2
5
Q
Add write permissions to test1
A
chmod 664 test1
6
Q
chmod g+w,o-x ops_team/
A
synmbolic mode to change permissions
7
Q
To switch users?
A
sudo su - clark (this only works if you have sudo permissions)