1 / 17

Lecture 6: File Systems ( ch 4)

Lecture 6: File Systems ( ch 4). IT244 - Introduction to Linux / Unix Instructor: Bo Sheng. Access Permissions. Execute permission on files Binary and script cp /home/shengbo/it244/binary . cp /home/shengbo/it244/script . ls – l (check the execute permission) cat binary cat script.

yuval
Télécharger la présentation

Lecture 6: File Systems ( ch 4)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lecture 6: File Systems (ch 4) IT244 - Introduction to Linux / Unix Instructor: Bo Sheng

  2. Access Permissions • Execute permission on files • Binary and script • cp /home/shengbo/it244/binary . • cp /home/shengbo/it244/script . • ls –l(check the execute permission) • cat binary • cat script

  3. Access Permissions • Execute permission on files • Binary and script • chmod a=x binary • ./binary

  4. Access Permissions • Execute permission on files • Binary and script • chmod a=x script • ./script • chmod a=rx script

  5. Access Permissions • Execute permission on files • Binary ( x ) • Script ( rx )

  6. Access Control List • ACL: fine-grained access control • getfacl and setfacl • getfacl hello • setfacl –mu:shengbo:rw- hello • getfacl hello • setfacl –m u:shengbo:4 hello • getfacl hello

  7. Access Control List • ACL: fine-grained access control • getfacl and setfacl • setfacl –m u:shengbo:rw-,u:yingmao:6 hello • getfacl hello • setfacl –x u:yingmao hello • getfacl hello

  8. Links • Pointer to a file or directory

  9. Links • Example • ls –l ~ • cd it244 • pwd

  10. Links • Example • ls –l ~ / home courses username it244 it244 username

  11. Links • Hard links and symbolic links • Hard links point to the actual data

  12. Links • Hard links and symbolic links • Hard links point to the actual data • ln hello hello1 • ls -l • ls –i hello hello1 (inode number)

  13. Links • Hard links and symbolic links • Hard links point to the actual data • cat hello hello1 • rm hello • cat hello1 • lnVS.cp • Hard links cannot point to directories

  14. Links • Hard links and symbolic links • Symbolic (soft) links are shortcuts Hard link Symbolic link

  15. Links • Hard links and symbolic links • Symbolic (soft) links are shortcuts • ln –s hello hello2 • ls -l • ls –i hello hello1 hello2

  16. Links • Hard links and symbolic links • Symbolic (soft) links are shortcuts • cat hello hello1 hello2 • rm hello • cat hello1 • cat hello2 • echo hi > hello • cat hello hello1 hello2

  17. Links • Hard links and symbolic links • Remove links • rm hello1

More Related