5-Manipulating File Permissions - Recap - 1 owner - 1 Group - r=read - w=write - x=execute - -rwxrwxrwx - applied to First Permissions - 1. Owner - 2. Group - 3. Everyone - **********WARNING********** - Do not mess with File Permissions Unnecessarily - Do not mess with System Files and Supplied Directories - ~ , ~/Documents, /System, etc - 3 Commands - chown username file(s) - changes the owner of the file - Only 1 Flag: -R - applies changes recursively, down into the filesystem - chown -R username file(s) - chgrp group file(s) - Only 1 Flag: -R - applies changes recursively, down into the filesystem - chgrp -R username file(s) - Put the two together: - chown username:group file(s) - chmod - OLD Command - background - permissions are 3 bit binary #s - rwx=111 - r-x=101 - etc - to use this command, a number is necessary to show which permissions to set - to find it, use this trick: - always say rwx in that order - r=4 - w=2 - x=1 - rwx=4+2+1=7 - r-x=4+1=5 - rw-=4+2=6 - r--=4=4 - Put them in rwx order: - rwxrwxrwx=777 - rwxr-xr-x=755 - most common - rw-r--r--=644 - rwx------=700 - chmod the 3 # sequence file(s) - Only 1 Flag: -R - applies changes recursively, down into the filesystem - chmod -R the 3# sequence file(s) - example - chmod 755 ~/Documents/myfile - check to make sure you did it right, do ls -l - Bart Busschots - bartb.ie - impodcast.tv - podfeet.com