By DK400
I was looking to add permissions on my server so i can edit files and somehow ended up crashing the whole site. Now im getting the following error:
Forbidden
You don't have permission to access / on this server.
Server unable to read htaccess file, denying access to be safe
Apache/2.4.18 (Ubuntu) Server at nutritionsupply.co Port 443
I looked at the logs and was able to retrieve the following errors:
[Fri Aug 03 01:44:47.545537 2018] [core:crit] [pid 32690] (13)Permission denied: [client 99.228.252.65:10967] AH00529: /var/www/html/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/var/www/html/' is executable, referer: https://nutritionsupply.co/
[Fri Aug 03 01:44:52.538084 2018] [core:crit] [pid 32690] (13)Permission denied: [client 99.228.252.65:10967] AH00529: /var/www/html/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/var/www/html/' is executable
[Fri Aug 03 01:44:52.698072 2018] [core:crit] [pid 32690] (13)Permission denied: [client 99.228.252.65:10967] AH00529: /var/www/html/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/var/www/html/' is executable, referer: https://nutritionsupply.co/
[Fri Aug 03 01:45:36.234395 2018] [core:crit] [pid 32073] (13)Permission denied: [client 99.228.252.65:10993] AH00529: /var/www/html/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/var/www/html/' is executable, referer: https://nutritionsupply.co/wp-admin/admin.php?page=aws-options
[Fri Aug 03 01:45:50.225236 2018] [core:crit] [pid 32502] (13)Permission denied: [client 99.228.252.65:10994] AH00529: /var/www/html/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/var/www/html/' is executable, referer: https://nutritionsupply.co/wp-admin/theme-editor.php?file=functions.php&theme=Divi
[Fri Aug 03 01:45:54.188500 2018] [core:crit] [pid 32502] (13)Permission denied: [client 99.228.252.65:10994] AH00529: /var/www/html/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/var/www/html/' is executable, referer: https://nutritionsupply.co/wp-admin/post.php?post=455&action=edit
[Fri Aug 03 01:47:36.246086 2018] [core:crit] [pid 31888] (13)Permission denied: [client 99.228.252.65:11016] AH00529: /var/www/html/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/var/www/html/' is executable, referer: https://nutritionsupply.co/wp-admin/admin.php?page=aws-options
[Fri Aug 03 01:49:36.229880 2018] [core:crit] [pid 410] (13)Permission denied: [client 99.228.252.65:11033] AH00529: /var/www/html/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/var/www/html/' is executable, referer: https://nutritionsupply.co/wp-admin/admin.php?page=aws-options
[Fri Aug 03 01:51:36.236811 2018] [core:crit] [pid 31868] (13)Permission denied: [client 99.228.252.65:11082] AH00529: /var/www/html/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/var/www/html/' is executable, referer: https://nutritionsupply.co/wp-admin/admin.php?page=aws-options
[Fri Aug 03 01:53:37.234074 2018] [core:crit] [pid 32503] (13)Permission denied: [client 99.228.252.65:11125] AH00529: /var/www/html/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/var/www/html/' is executable, referer: https://nutritionsupply.co/wp-admin/admin.php?page=aws-options
Any ideas on what i screwed up?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Accepted Answer
Figured it out, accidentally applied 774 permissions to the entire group and subgroup.
Fix was chown www-data back to the /var/www folder and then run the command below to apply all the correct permissions across the file system. Make sure you cd into /var/www before running below.
find html -type f -exec chmod 664 {} + -o -type d -exec chmod 775 {} +
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.