100 likes | 200 Views
File System Security ls -l. First Columm. d = directory l = symbolic link b = block special file c = character special file p = fifo (or named pipe) special file - = ordinary file s = named socket special file. Second Column. rwx --- --- user “owner” permissions:
E N D
First Columm • d = directory • l = symbolic link • b = block special file • c = character special file • p = fifo (or named pipe) special file • - = ordinary file • s = named socket special file
Second Column • rwx--- --- • user “owner” permissions: • if you created it, you own it • --- rwx --- • group “owner” permissions: • you and other people in the owner’s group • --- --- rwx • other “world” permissions: • everyone else
Three types of file access: • Read – List the contents of a file • Write – Update the contents of the file • Execute – If the file is a program, run it Three types of directory access: • Read – List the files in the directory • Write – Rename or delete files in the directory, or copy files to the directory • Execute – cd to the directory
chmod • chmod u (user) • chmod g (group) • chmod a (all) • chmodu+w ./quarters = add write permission to user • chmodg+rwx ./quarters = add all permssions to all • chmod a-wx ./quarters = remove write and execute for all
chmod chmod 744 ./quarters chmod 774 ./quarters chmod 544 ./quarters
umask • Change the system-wide default permission • Default permissions for all files created in the future until umask is changed • umask 077
chown • chown = change file ownership • chownhoffmann ./quarters
chgrp • chgrp = change group owner • chgrpthegame ./quarters
newgrp • switching groups • newgrpthegame