[users@httpd] Process environment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello everybody,

I use httpd 2.0.51 together with PHP5 module.

Httpd is started as root. The child processes are then started less
privileged (User, Group). When I run a PHP script that executes a
program on the server, this program would like to access data in the
users home directory. To get the directory's location, the program
evaluates $HOME environment variable. But $HOME now does not point to
the home directory of the less privileged user that httpd switched to,
it points to '/root', which is the home directory of the user that
_initially_ started httpd.
The result is a less privileged process trying to access root's home
directory, which does not work. Running a PHP script executing 'phpinfo()'
and looking at section 'Environment' (not 'Apache environment') also
shows $HOME to be equal to '/root'.

Can I change anything in httpd's configuration so the environment
variables get the values for the less privileged user or is this
something to change at compile time or even in PHP?

many thanks,

-------------------------

Felix




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux