| Command |
Description |
|
# chgrp group1 file1 |
change group of files [man] |
|
# chmod ugo+rwx directory1 |
set permissions reading (r), write (w) and (x) access to users owner (u) group (g) and others (o) [man] |
|
# chmod go-rwx directory1 |
remove permits reading (r), write (w) and (x) access to users group (g) and others (or [man] |
|
# chmod u+s /bin/file1 |
set SUID bit on a binary file - the user that running that file gets same privileges as owner [man] |
|
# chmod u-s /bin/file1 |
disable SUID bit on a binary file [man] |
|
# chmod g+s /home/public |
set SGID bit on a directory - similar to SUID but for directory [man] |
|
# chmod g-s /home/public |
disable SGID bit on a directory [man] |
|
# chmod o+t /home/public |
set STIKY bit on a directory - allows files deletion only to legitimate owners [man] |
|
# chmod o-t /home/public |
disable STIKY bit on a directory [man] |
|
# chown user1 file1 |
change owner of a file [man] |
|
# chown -R user1 directory1 |
change user owner of a directory and all the files and directories contained inside [man] |
|
# chown user1:group1 file1 |
change user and group ownership of a file [man] |
|
# find / -perm -u+s |
view all files on the system with SUID configured [man] |
|
# ls -lh |
show permits on files [man] |
|
# ls /tmp | pr -T5 -W$COLUMNS |
divide terminal into 5 columns [man] |