Re: Access & Permissions
Lo, on Tuesday, March 20, Matthew Sackman did write:
> On Tue, Mar 20, 2001 at 01:04:27PM -0500, C Mead wrote:
> > Hi,
> >
> > I need to give access to my /www/ dirs to regular users for apache. Can
> > someone please take me through the steps of changing the permissions
> > and groups recursively.
Once you figure out what permissions and owners you want, both chown and
chmod take an -R flag, which recurs through the directory tree(s) specified.
<SNIP> good suggestion about how to set up this tree....
> I believe that the chmod g+rwx with the 'x' is needed because I've found that
> otherwise some filemanagers will not display the contents of the directory
> (which is probably not desireable... ;-)
This isn't a filemanager issue; even /bin/ls will do this (more or less).
The meaning of the various permission flags is a bit non-intuitive on
directories:
r -- allows you to read the directory, i.e., list the filenames contained
in that directory, but not necessarily any of the other information.
(See below.)
w -- allows you to write to the directory: create new files and delete
existing files (regardless of the permissions on the files in
question, but check out the sticky bit).
x -- allows you to `search' the directory. Basically, this allows you to
translate from a filename to an inode, which contains all of the other
details about a file: length, permissions, location on disk, owner,
etc. This is why /bin/ls -l won't work on a directory which you can't
`execute'. Also, you can't open a file in a directory which you can't
execute, since you can't get to the inode to find out where the file's
data blocks liive.
(Source: _Linux Application Development_, Michael K. Johnson & Eric
W. Troan, section 10.1.1. I *think* this stuff is listed in a man page
somewhere, but I can never find the silly thing....)
Richard
Reply to: