Today i migrated my images from one server to another and faced a strange permission issue
[Mon Mar 25 08:42:23.676315 2013] [core:crit] [pid 15182] (13)Permission denied: [client 24.14.2.22:48113] AH00529: /files/domain.com/public_html/images/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/files/domain.com/public_html/images/' is executable, referer: http://domain.com.com/file.php
what i've tried:
chmod -R 777 root_dir
restorecon -r
disable selinux
Chown -R root:root root_dir
I had the same problem. For me, it's a problem of SeLinux (CentOS 7).
It works for me:
Note that you should change the above
/var/www/html/
to an appropriate directory.Today I faced this problem. I transferred public_html from the old drive to new one and chown like this:
This is correct for sub directories and files inside public_html, but the user of public_html must be nobody so apache can check it's content, so this solved my problem:
Note: owner is the user (for example web1)
open your httpd.conf file and change Deny from all to Allow from all on the .htaccess file
The following lines prevent .htaccess and .htpasswd files from being
viewed by Web clients.
this solved my problem
TL;DR:
You need to make certain that the directory, and all of its parent directories, are readable and executable (executability is required to open a directory) by the web server. You can do this by making the web server user the owner and making the user perms (EG:
chown apache <dir>; chmod u+rx <dir>;
), or by a making the group be the web server group a group which includes the web server user and setting the group perms to (EG:chgrp apache <dir>; chmod g+rx <dir>;
), or by setting the world perms to (EG:chmod o+rx <dir>;
).I was using Plesk onyx and I got the same error message, I just changed the folder permission to 775 and it worked for me.
When I checked
httpd/user-error_log
, it gavechmod 755 is not fixing the problem. Below command is what works for me. I use http since it is the apache user and group used in Synology DSM 5.1-5021
more details about the new change Apache / Webserver limitations in 5.0