I'm running an Apache web server on a Ubuntu instance on AWS. Apache is writing its logs to the default directory /var/log/apache2
and only root
has the permission to write the files there.
-rw-r----- 1 root adm 9858 Mar 29 11:12 access.log
I have checked that www-data
does not belong to adm
group.
Apache is running as www-data
according to ps aux | grep apache
root 1263 0.0 0.6 89996 6460 ? Ss 06:05 0:00 /usr/sbin/apache2 -k start
www-data 2432 0.0 1.3 382912 13604 ? Sl 11:11 0:00 /usr/sbin/apache2 -k start
www-data 2433 0.0 1.3 448384 14012 ? Sl 11:11 0:00 /usr/sbin/apache2 -k start
So is the Apache process running as root
responsible for writing the logs?