Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 187516 - www-servers/apache-2.2.4-r10: HOME is set to /root
Summary: www-servers/apache-2.2.4-r10: HOME is set to /root
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Apache Team - Bugzilla Reports
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-02 16:21 UTC by Tiziano Müller (RETIRED)
Modified: 2007-09-10 09:15 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tiziano Müller (RETIRED) gentoo-dev 2007-08-02 16:21:57 UTC
... and this can cause a lot of pain together with mod_auth_ldap or mod_python.

Python will then try to write to /root/.python-eggs for it's egg-cache/-store and mod_auth_ldap will use /root/.ldaprc together with the manual configuration in the apache's configuration-files. Combined with the strange OpenSSL-behaviour to re-start the TLS-session on configuration-changes it will give a nice failure when trying to connect to a LDAP-Server using SSL or TLS and causes a lot of debugging hours since Apache doesn't output enough LDAP error-messages even with "Loglevel debug".
Comment 1 Benedikt Böhm (RETIRED) gentoo-dev 2007-08-03 08:28:48 UTC
neither mod_authnz_ldap nor mod_python use HOME in their code, and i'm using both modules without any problems for a long time... sounds like a config error to me
Comment 2 Tiziano Müller (RETIRED) gentoo-dev 2007-08-03 16:13:42 UTC
Nope, it isn't.
The problem is not that those modules use HOME, but the libraries they depend on.
Comment 3 Tiziano Müller (RETIRED) gentoo-dev 2007-08-07 09:24:34 UTC
... and the same problem applies to lighttpd.
Even if home is set to /var/www in passwd, executing phpinfo() gives me:
"HOME   /root"
... and even:
"USER   root"
but checking all the processes shows that neither lighttpd nor php-cgi are running as root.
Comment 4 Benedikt Böhm (RETIRED) gentoo-dev 2007-08-13 12:20:29 UTC
please use the SetEnv directive to specify an egg-cache (e.g. SetEnv PYTHON_EGG_CACHE /var/www)
Comment 5 Tiziano Müller (RETIRED) gentoo-dev 2007-08-13 14:05:52 UTC
*argh* HOME is set to /root, which should not be the case
It should be the same thing /etc/passwd for the apache-user.
Comment 6 Benedikt Böhm (RETIRED) gentoo-dev 2007-08-14 15:15:37 UTC
well, HOME is not even set here in phpinfo(); and i'm not sure we need/want that... *shrug*
Comment 7 Benedikt Böhm (RETIRED) gentoo-dev 2007-09-10 09:15:41 UTC
this is not easily fixable since the environment is inherited from the init script, which is called as root. we could fix this by using --user with start-stop-daemon, but then apache could not bind to anything < 1024

otoh, mod_authnz_ldap works perfectly fine here without a correct HOME, so does the python egg cache if set with SetEnv.

if it really bothers you please customize the init script yourself