Hello,
I’m new using DigitalOcean
I created a Droplets with Ubuntu 14.04, I followed the instructions in the Initial Server Setup, create a new user, change the SSH port, etc., I followed the tutorial for LAMP Stack on Ubuntu 14.04, I have installed Apache2, MySQL, PHP, Secure phpMyAdmin installation, configure the host to run through a domain (Setup Host Name), install WordPress; Postfix, ProFTPd for file transfer over SSH (sftp).
When I was installing a Wordpress theme, I requested for details SSH keys, searching Google I found that assigning changing the public_html owner from my user to www-data, wordpress works fine! sudo chown www-data:www-data -R /var/www/html, the theme was installed without problems, I work several days without errors, until I tried the sftp via ssh.
Using the sftp I had access to my user’s folder but when I went to /var/www/html, there is not files or cannot see them, I realized that changing the permissions to www -data, my user did not have access to them, so I change the owner of the files to my new user, not root, I assign the chown to the new user created in the initial server setup. The page began to launch a 403 Forbidden.
I put back chown to www-data on folder /var/www/ and now I see the index.php (Default page) but can’t navigate or see any post or subfolder, the server say: 403 " You do not have permission to access on this server xxxx."
Any 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!
Thank you accounts! <br> <br>stuffexchange, I follow the link, this solve my problems! <br> <br> <br>
Check this thread, too: <br> <br>https://www.digitalocean.com/community/questions/permissions-sftp-v-wordpress
While I don’t know all of the details, it sounds like not all of your files are owned by www-data. One way to make sure is to run “chown -R www-data /var/www”. The -R makes the command recursive, so it’ll ensure that every file and subdirectory are also owned by www-data. <br> <br>This is a symptom of a larger problem - one of the first problems I encountered in server management - how do you allow Apache to access the files while still being able to create / modify / transfer files using your normal user account? I’m no expert, but you might look into using user groups to solve the issue. <br> <br>All of my public web files in /var/www belong to the www-data group (chgrp -R www-data /var/www) which allows Apache to access the files if permissions are set correctly, regardless of who owns the files. <br> <br>This is only one possible approach; there are several.
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.