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!
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!
I also faced same issue but now it solved for me. Thank you for the help.
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
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.