I good solved my exit by setting permissions not lone to the
DocumentRootdirectory, but besides to all its rear directories. This is how I did it. Lets say that you received the Permission Denied erroneousness when accessing the file /usr/local/apache2/htdocs/foo/bar.html on a unix-like organization. If you are running 2.4, the AH error code may give you more information here. typical permissions on a unix-like system for resources not owned by the User or Group specified in httpd.conf would be 644 -rw-r — roentgen — for ordinary files and 755 drwxr-x-r-x for directories or CGI scripts. You may besides need to check extend permissions ( such as SELinux permissions ) on operating systems that support them.
In order to serve files, Apache must have the proper license granted by the operate system to access those files. In finical, the User or Group specified in httpd.conf must be able to read all files that will be served and search the directory containing those files, along with all parent directories up to the root of the filesystem. mistake 13 indicates a filesystem permissions problem. That is, Apache was denied access to a file or directory due to incorrect permissions. It does not, in general, imply a problem in the Apache shape files. then do the same for the directory and each parent directory ( /usr/local/apache2/htdocs/foo, /usr/local/apache2/htdocs, /usr/local/apache2, /usr/local, /usr ) : On some systems, the utility program namei can be used to help find permissions problems by listing the permissions along each component of the way :
namei -m /usr/local/apache2/htdocs/foo/bar.html If your organization does n’t have namei, you can use parsepath. It can be obtained from here.
Read more: Best Hosts for Bootstrap Projects
If all the standard permissions are adjust and you calm get a Permission Denied error, you should check for extended-permissions. For exercise you can use the command setenforce 0 to turn off SELinux and check to see if the problem goes aside. If indeed, fifty -alZ can be used to view SELinux license and chcon to fix them .
In rare cases, this can be caused by other issues, such as a file permissions trouble elsewhere in your apache2.conf file. For example, a WSGIScriptAlias directive not mapping to an actual file. The error message may not be accurate about which file was indecipherable .
DO NOT set files or directories to mode 777, even “ equitable to test ”, evening if “ it ‘s barely a test server ”. The function of a quiz server is to get things correct in a safe environment, not to get away with doing it incorrect. All it will tell you is if the trouble is with files that actually exist .
Although the CGI script permission might look decline, the actual binary star specified in the shebang might not have the proper permissions to be run. ( Or some directory on its path, check with namei as explained above. )
(13)Permission denied: proxy: HTTP: attempt to connect to 127.0.0.1:8080 (localhost) failed
This erroneousness is not truly about file permissions or anything like that. What it actually means is that httpd has been denied permission to connect to that IP address and port.
The most coarse induce of this is SELinux not permitting httpd to make net connections .
To resolve it, you need to change an SELinux boolean value ( which will mechanically persist across reboots ). You may besides want to restart httpd to reset the proxy proletarian, although this is n’t strictly required .
# setsebool -P httpd_can_network_connect 1