School of Computing. Dublin City University.
-rwxr-xr-- 1 userid groupid 153 Nov 6 2008 filename - file (d for directory, l for link/shortcut) rwx User (u) can read,write,execute. r-x Other members of group (g) can read,execute only. r-- Other people (o) can read only. set via the "chmod" command. see "man chmod" user group other [ ][ ][ ] [ ][ ][ ] [ ][ ][ ] r - read w - write x - execute
Don't execute by accident.
Because UNIX will try to execute any text file as shell script if name is typed.
e.g. text files, web pages
write-protect for safety
|[r][-][-]||both of above|
|Shared writable file|
|Shared read-only file|
|[-][-][-]||Normal - Hidden from others|
Web pages (HTTP requests come in as "other"): -rwx---r-- CGI text scripts: -rwx---r-x CGI binaries only need execute: -rwx-----x (Normal binaries also only need execute.) PHP page only needs r, not x: -rwx---r--