Apache Group and User names
Stephen R Laniel
steve at laniels.org
Fri Jan 27 16:56:34 UTC 2006
On Fri, Jan 27, 2006 at 10:23:44AM -0600, Wade Smart wrote:
> Im doing a tutorial on writing and reading files created through php and im
> having a bit of a problem. I understand that that file needs to already be
> created so you can set permissions on it but, my book says that php has no user
> or group that it belongs to and so you set the file owner and group it belongs
> to, to apache. I do not see that in the lists. Do I have to add this? Surely
> not. Apache is running fine at the moment so it must be under something not
> instantly recognizable.
I'm not sure that I understand your question. If the PHP
script is running within Apache, it will run as the Apache
user. Normally the apache user is 'www-data' or somesuch,
though it's configured in /etc/apache/httpd.conf -- e.g.,
User www-data
Group www-data
When you run a PHP script under Apache, Apache invokes a
subprocess to run as that user and that group, and that
subprocess runs the PHP script.
Another alternative is for the scripts to run suid, which
means that they run as the user who owns them.
--
Stephen R. Laniel
steve at laniels.org
Cell: +(617) 308-5571
http://laniels.org/
PGP key: http://laniels.org/slaniel.key
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20060127/fd9a274b/attachment.sig>
More information about the ubuntu-users
mailing list