Forbidden Access

Can’t bring up website. I receive 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”

I have a LAMP droplet install with Ubuntu 16.04. I was having trouble transferring files using SFTP thru a client and SSH in and changed the sudo user permission to 766. Now after transferring files I get the forbidden access error.

I tried to find the apache error log file under /var/log but couldn’t see one I ran the following command in the var/www/html# ls -la and the output shows

drwxrw-rw- 3 [sudouser] [sudouser] 4096 Aug 15 23:47 . drwxrwxr-x 3 [sudouser] [sudouser] 4096 Jan 15 2018 … -rwxrw-rw- 1 [sudouser] [sudouser] 1324 Jan 15 2018 index.html -rwxrw-rw- 1 [sudouser] [sudouser] 20 Jan 15 2018 info.php drwxrwxr-x 8 [sudouser] [sudouser] 4096 Aug 15 23:48 wais

Do I need to change the permissions again? Not sure what command to execute. Help!


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

I also faced same issue but now it solved for me. Thank you for the help.

Yes! This worked. Thank you.

Hello friend!

Try this: chown -R www-data. /var/www

Apache will run as the www-data user by default, which will not have permission to access the files from the user that you have created.

Kind Regards, Jarland