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

No comments:
Post a Comment