For some reason, apache doesn't seem to be able to write to it's own directory! (/var/www
). error_log simply fails to output to files. Any help here would be great
I am using ubuntu 12.04 with apache2 and php-mod. I have noticed this same issue on every single ubuntu install, so it isn't local to this server. It seems like the vanilla configuration for the apache2 package doesn't give write permissions to itself for /var/www
Here's a little more info regarding the permissions:
$ ls -l /var/www
total 20
drwxrwxr-x 7 jenkins www-data 4096 Apr 22 14:09 healthtrustsoftware
-rwxrwxr-x 1 jenkins root 177 Mar 27 23:00 INDEX.html
drwxrwxr-x 2 root root 4096 Apr 30 09:38 nas
drwxrwxr-x 2 jenkins www-data 4096 Mar 27 23:30 test
-rwxrwxr-x 1 root root 48 Apr 30 09:35 test.php
ps -ef | grep apache output:
$ ps -ef | grep apache
root 13331 1 0 Apr26 ? 00:00:02 /usr/sbin/apache2 -k start
www-data 16540 13331 0 Apr28 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 16541 13331 0 Apr28 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 16542 13331 0 Apr28 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 16543 13331 0 Apr28 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 16544 13331 0 Apr28 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 21876 13331 0 09:25 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 21877 13331 0 09:25 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 21878 13331 0 09:25 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 21879 13331 0 09:25 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 22203 13331 0 09:29 ? 00:00:00 /usr/sbin/apache2 -k start
xxxxxx 23099 22965 0 10:18 pts/1 00:00:00 grep --color=auto apache
Also, it appears that error_log doesn't even create the file.
Jenkins user has ownership because we use jenkins for automated deployment via FTP. However, the entire www-data group should have the same permissions as the primary user, and since apache should be part of the www-data group, this should work should it not? Thanks for the help