Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/files/domain.com/public_html/images/' is executable

Tags:

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 
like image 280
teslasimus Avatar asked Mar 25 '13 03:03

teslasimus


1 Answers

Today I faced this problem. I transferred public_html from the old drive to new one and chown like this:

chown -R owner:owner public_html 

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:

chown owner:nobody public_html 

Note: owner is the user (for example web1)

like image 105
Ali Avatar answered Sep 23 '22 15:09

Ali