|
|
|
|
| Apache no longer has access to script files etc. |
|
Problem: After upgrading Apache, certain CGI scripts no longer seem to work while others work just fine. The log file "/var/log/httpd/error_log" contains messages like this:
"file permissions deny server execution: /path/to/myscript.cgi"
Other scripts will execute but can't access its data files. Some of them just fail in various weird ways, others complain about lack of file permissions.
|
|
Solution: Recent rpm versions of Apache run as apache/apache instead of nobody/nobody. The UID and GID are different, which effectively means Apache no longer has ownership of the relevant scripts and/or data files.
There are two ways to solve this problem:
* The quick and dirty one: change the UID of the "apache" user from the default 48 to 99 to match the "nobody" user.
* The proper one: change ownership of all files currently belonging to "nobody" to "apache". This MAY break other user-made services on the server so be careful.
Also, make sure to set the home directory in /etc/passwd to a directory where the apache/nobody user has write permissions, like /tmp (not recommended unless ALL users are trusted) or a directory created for that purpose (much safer)
|
|
|
|
|
|
This is free technical advice without any warranties.
Use at your own risk. Solutions offered may not apply to your particular problem at all.
Opinions and views expressed in the articles are the authors' personal
and may not necessarily reflect or coincide with those of Ano-Tech Computers.
We take no responsibility if anything bad happens from following any of
the intructions given. If you don't understand and accept this, please
contact us for personal assistance instead.
To read our full disclaimer, go
here.
We welcome anyone who is willing to contribute to this public knowledge base,
contact siteadmin@atc.no
if you have information you would like to share. The idea is not to replace
the commercial support sites, but to publish those hard-to-find
solutions you've found yourself looking for over and over again.
Show all articles