My apache error log is full
Error opening file for reading: Permission denied Error opening file for reading: Permission denied Error opening file for reading: Permission denied
and etc.
How to identify the file or folder of files causing this permission error? There is no direct connection between the appearance of errors and access_log requests.
Google suggests using strace , but when I do
strace apache2
or
strace -etrace:open apache2
The answer is quite detailed, and since I still haven't used this tool before, I'm not sure what to look for. Here that which appears is traced.
..... open("/lib/x86_64-linux-gnu/libnss_nis.so.2", O_RDONLY|O_CLOEXEC) = 3 open("/lib/x86_64-linux-gnu/libnss_files.so.2", O_RDONLY|O_CLOEXEC) = 3 open("/etc/passwd", O_RDONLY|O_CLOEXEC) = 3 apache2: bad user name ${APACHE_RUN_USER}
The last line is the only one, which, apparently, may be the reason, but my web server processes images and all kinds of files on the disk, which would be a problem if the user apache were not enough.
Thanks.
David lowry
source share