file system security ls -l. first columm d = directory l = symbolic link b = block special file c =...
DESCRIPTION
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 Second ColumnTRANSCRIPT
![Page 1: 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](https://reader036.vdocuments.site/reader036/viewer/2022082510/5a4d1b627f8b9ab0599add83/html5/thumbnails/1.jpg)
File System Security
ls -l
![Page 2: 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](https://reader036.vdocuments.site/reader036/viewer/2022082510/5a4d1b627f8b9ab0599add83/html5/thumbnails/2.jpg)
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
![Page 3: 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](https://reader036.vdocuments.site/reader036/viewer/2022082510/5a4d1b627f8b9ab0599add83/html5/thumbnails/3.jpg)
• 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
Second Column
![Page 4: 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](https://reader036.vdocuments.site/reader036/viewer/2022082510/5a4d1b627f8b9ab0599add83/html5/thumbnails/4.jpg)
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
![Page 5: 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](https://reader036.vdocuments.site/reader036/viewer/2022082510/5a4d1b627f8b9ab0599add83/html5/thumbnails/5.jpg)
chmod
• chmod u (user)• chmod g (group)• chmod a (all)
– chmod u+w ./quarters = add write permission to user– chmod g+rwx ./quarters = add all permssions to all– chmod a-wx ./quarters = remove write and execute for all
![Page 6: 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](https://reader036.vdocuments.site/reader036/viewer/2022082510/5a4d1b627f8b9ab0599add83/html5/thumbnails/6.jpg)
chmodRead Write Execute Octal Outcome Outcome
4 2 1 7 rwx4 2 - 6 rw-4 - 1 5 r-x4 - - 4 r--- 2 1 3 -wx- 2 - 2 -w-- - 1 1 --x
chmod 744 ./quarterschmod 774 ./quarterschmod 544 ./quarters
![Page 7: 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](https://reader036.vdocuments.site/reader036/viewer/2022082510/5a4d1b627f8b9ab0599add83/html5/thumbnails/7.jpg)
umask
• Change the system-wide default permission• Default permissions for all files created in the
future until umask is changed
• umask 077
![Page 8: 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](https://reader036.vdocuments.site/reader036/viewer/2022082510/5a4d1b627f8b9ab0599add83/html5/thumbnails/8.jpg)
chown
• chown = change file ownership
• chown hoffmann ./quarters
![Page 9: 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](https://reader036.vdocuments.site/reader036/viewer/2022082510/5a4d1b627f8b9ab0599add83/html5/thumbnails/9.jpg)
chgrp
• chgrp = change group owner
• chgrp thegame ./quarters
![Page 10: 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](https://reader036.vdocuments.site/reader036/viewer/2022082510/5a4d1b627f8b9ab0599add83/html5/thumbnails/10.jpg)
newgrp
• switching groups
• newgrp thegame