Question

Crashed website, don't have access to server

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?

Show comments

Submit an answer


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!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

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 {} +

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel