Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Nov 2003 20:10:31 +0100
From:      Jean-Baptiste Quenot <jb.quenot@caraldi.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: owner of dir/files
Message-ID:  <20031111191029.GB59651@flower.intra.caraldi.com>
In-Reply-To: <001701c3a864$408415e0$fa65a8c0@ocfl061>
References:  <200310111243.08231.jason@dictos.com> <035501c3909c$3d1dd8d0$a4b826cb@goo> <001c01c3a082$afab7d30$0100000a@Biggie> <200311021458.49682.malcolm.kay@internode.on.net> <1067814513.825.497.camel@verdammt.falcotronic.net> <44ad7dimrc.fsf@be-well.ilk.org> <1067898777.825.714.camel@verdammt.falcotronic.net> <001701c3a864$408415e0$fa65a8c0@ocfl061>

next in thread | previous in thread | raw e-mail | index | archive | help
* 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/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031111191029.GB59651>