owner of dir/files
Jean-Baptiste Quenot
jb.quenot at caraldi.com
Tue Nov 11 11:10:34 PST 2003
* M.D. DeWar:
> I just noticed that when I d/led a program and un-tarred it and set it
> up that the directory in the apache web root has as owner something
> like 501:www . I also noticed some others that were mysql:mysql or
> 500:100 for the user/group.
>
> I am not sure what happens if left that way. Since there is no
> user/group for those does it mean the files won't run or be served ?
Whether the files will be served or not depends on the file mode, not
the file owner. Apache runs as user www, so www must be able to read
those files. When files have mode 644 and dirs 755, it is always
possible to serve a website, whatever the owner (user/group) is.
> In my web root should all directories and files be nobody:nobody ?
The files and directories should be owned by their actual author, to be
able to change them.
> what if some are root:wheel ?
Then only root will be able to gain the user mode, and only users in the
wheel group will be able to gain the group mode. For example if the
mode is 640, root can write to the file, and users in wheel can read the
file. But Apache won't be able to read it.
See chmod(1) for more details.
Cheers,
--
Jean-Baptiste Quenot
http://caraldi.com/jbq/
More information about the freebsd-questions
mailing list