faqts : Computers : Programming : Languages : PHP : Installation and Setup : Security

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

18 of 20 people (90%) answered Yes
Recently 8 of 10 people (80%) answered Yes

Entry

Why are the files I create in PHP owned by "nobody"?
Can I use suexec in Apache with the module version of PHP?

Jun 12th, 1999 07:00
Nathan Wallace, M.Brands


The files are owned by user nobody because that's the username the
apache server is running under.  There is currently no way to
change this for the module version of PHP.

You can, however, use the CGI version of PHP and combine it with
Apache's suEXEC feature. PHP will then run under the users UID/GID
and will be able to create files and directories with the right
ownerships. The CGI version is a bit slower than the module version
though.

The writer of the FHTTPD server suggested compiling PHP for his
server. You can find more information on http://www.fhttpd.org.