How do I fix Apache AH00132 Error? [closed]
I have the following error. How can I fix this?
AH00132: file permissions deny server access: /var/www/html/index.html
Solution 1:
The error:
AH00132: file permissions deny server access "/var/www/html/index.html"
is quite descriptive.
The obvious solution is of course
Adjust the file permissions
and ensure that the Apache server is allowed to access your content.
- Find the current permissions. Not only on the index.html file, but also on all directories that make up the path:
/
,/var/
,/var/www/
and/var/www/html/
.
An easy way to do that in a single command, rather than with a bunch of ls
commands is with namei -nom /var/www/html/index.html
.
namei -nom /var/www/html/index.html
f: /var/www/html/index.html
dr-xr-xr-x root root /
drwxr-xr-x root root var
drwxr-xr-x root root www
drwxr-xr-x root root html
-rw-r--r-- root root index.html
Adjust with chmod
where incorrect.
- When those permissions don't seem overly restrictive and look good (like the ones above) consider that for example SELinux policies can also restrict access.
Check withgetenforce
if SElinux is enabled.
If it is, check withausearch -m AVC,USER_AVC -ts recent
if there is a recent error regarding the file(s) Apache can't access. Conduct more troubleshooting if that is the case. See for example https://access.redhat.com/articles/2191331