Sunday, September 16, 2012

Easy learn linux command line- Part 8

the set permission for files is subject for this learning serious. Do you know, what it is file permission? which permissiones are in linux file systems? you learn their in this Part


Permits on Files

Command Description
# chgrp group1 file1 change group of files   
# 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   
# 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   
# 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   
# 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   
# ls -lh show permits on files   
# ls /tmp | pr -T5 -W$COLUMNS divide terminal into 5 columns   


source:linuxguide

No comments: