0
votes

I am new to php and drupal. After i completed work on site in locally i run it but shows below error in log/error.log

Permission denied: [client 127.0.0.1:37590] AH00529: /home/user/public_html/domainname.com/public/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/home/user/public_html/domainname.com/public/' is executable

I gave 777 permission to public folder below like this chmod -R 777 public/

after i googled i changed the permission to .htaccess file chmod 644 .htaccess then I gave permission to parentdirectory (public) folder chmod 755 public/

then again i installed new one locally(new site) but it shows the same error

but still it shows same error. Can any one help me from this?

1

1 Answers

0
votes

Open the httpd.conf (or apache2.conf) file and search for the User and Group directives. The values here refer to the user/group which will be used for Apache server.

Next, go to /home/user/public_html (or /home/user/public_html/domainname.com whichever is the DOCUMENT_ROOT) and do this:

sudo chown -R USER:GROUP ./

where USER and GROUP are the values of User and Group directives from above. Once that is done, set the htaccess file permissions to 0644 and try.