ls man page contains the information above
stat(2), chown(1), chmod(1) man pages has info on
set id bit effects
chown may not be available on your system except to root
chmod will accept both symbolic & octal representations of
permissions
id will show effective and actual user & group ids
-rw-rw-rw- usual file permissions if you are not paranoid drwxrwxr-x usual dir permissions if you are not paranoid -rw-r--r-- reasonable file permissions drwxr-xr-x reasonable dir permissions -rw-r----- usual file permissions if you are paranoid drwx--x--- usual dir permissions if you are paranoid
changing a file is the obvious - changing the contents in place (e.g. 'vi')
/u/smith owned by smith with drwx------ /u/smith/file1 owned by jones with -rw------- /u/smith/file2 owned by jones with -rw-rw-rw- /u/jones owned by jones with drwxrwxrwx /u/jones/file6 owned by smith with -rw------- /u/jones/file7 owned by smith with -rw-rw-rw- /u/dean owned by dean with drwxr-xr-x /u/dean/file11 owned by smith with -rw-r--r-- /u/dean/file12 owned by smith with -rw-rw-rw-
no one can access file1
smith can change the dir info about file1 but not the file contents
no one but smith can access file2
smith can change both the dir info & file contents of file2
no one but smith can access file6
everyone can access file7
jones can change the dir info but not the file contents of file6
smith can change the dir info & the file contents of file6
jones can change the dir info and the file contents of file7
smith can change the dir info & the file contents of file7
no one but smith can write file11
everyone can write file11
everyone can read & write file12
dean can change the dir info but not the file contents of file11
smith can change the file contents of file11 but not the dir inof
jones can access file11 but cannot change dir info or the contents
dean can change the dir info & the file contents of file12
smith can change the file contents of file12 but not the dir info
jones can change the file contents of file12 but not the dir info
Suppose you want to make a game program which keeps users high scores but you don't want the users to be able to mess with their scores.
1 -rwxr-xr-x game1 drwx--x--x game1_score -rw-rw-rw- game1_score/scores 2 -rw--w--w- game1_score/scores 3 -rw--w--w- game1_score/._not?*easy?*name_ 4 -rwSr-xr-x game2 drwx------ game2_score -rw------- game2_score/scores