Quote:
Originally posted by HQ
fiveyes, Thanks. Tell me if I got it right:
- the 'other' execute bit of a directory has to be on for reading and writing in that directory.
|
The execute bit for directories allows access to the directory, as well as all sub-directories below it. Without it, you aren't even allowed to chdir into it, much less read or write to any files within. If only the User's execute bit is set, then only that specific User can access it and the same for the Group execute bit. Having the Others execute bit set allows "the world" access to the directory tree. The read bit for a directory determines who may list the contents of it, though without it they can still read a file within it if they know it's name and the permissions on it allows them. The write bit on a directory determines who can alter the contents of a directory, but without it they can still alter a file if the file's permissions allow that. Of course, someone with super-user privileges can access/do anything they feel like!
Quote:
- the 'other' execute bit of a file does not matter for reading and writing (only the read/write bits matter).
|
Correct, reading and writing of files does not depend on the execute bit being set for the file in question. However, if the execute bits for the directory the file is within and
ALL of it's parent directories are not set correctly, then you couldn't even determine if it existed or not.
Quote:
...so what does an execute have to do with in a file (beside for the x-bit-hack that makes the server parse the html as shtml)?
|
The file could be a CGI program, in which case the execute bit must be set correctly for the server to execute it.