By layneheiny
Hi
I get so frustrated with the lack of my knowledge ;)
I’m setting up a new droplet. Nginx is installed and the “Welcome to nginx!” shows in the browser. PHP is also working as well as mysql and phpmyadmin.
Now, I connected sftp using filezilla with a username and tried to upload a file. The file would not upload and the error:
Error: /usr/share/nginx/www/installer.php: open for write: permission denied
Now this makes sense because root is the owner. I recall issues (and did searches) that WordPress will not update unless the correct ownership is provided. Sadly, answers are a bit cryptic.
I tried:
chgrp www-data /usr/share/nginx/www chmod g+w /usr/share/nginx/www
This did not work.
Also, I know that there must be a way to add permissions to the “myuser” account so that I can transfer files AND have WordPress update.
Thank you for the clarification.
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!
Hi Kamal, Hope you can help me, I have the same problem I don’t have writing permissions to update some files on wordpress using Winscp, I’ve followed this tutorial to install wordpress “https://www.digitalocean.com/community/tutorials/how-to-set-up-wordpress-multisite-with-nginx-on-ubuntu-14-04” and works fine. I’ve installed wordpress under “/usr/share/nginx/wpdir”, when I try to run as you mention “sudo usermod -a -G wpdir myuser” I get the message “group ‘wpdir’ does not exist”.
I have no user root instead I’ve created a new user “myuser” with sudo rights following this tutorial: https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-14-04
I have another question: why it is important to move wordpress from: “/usr/share/nginx/wpdir” to “/var/www”
Thanks
Thank you but I have a couple of questions for clarification. <br> <br>First, there is no “wordpress” user or group. I temporarily used www-data. <br> <br>Second, I moved the files to /var/www and updated the nginx config file. <br> <br>I’m still not able to update WordPress in wp-admin panel. :(
Your user does not have access to write to /usr/share/nginx/www. <br> <br>You also shouldn’t store your websites in /usr/share/nginx/www. Instead, store them in /var/www and edit nginx to serve the files from that directory: <br><pre>sudo mkdir /var/www <br>sudo chown wordpress. /var/www <br>mv /usr/share/nginx/www/* /var/www <br>mv /usr/share/nginx/www/.* /var/www</pre> <br> <br>Add your user to the wordpress group: <br><pre>sudo usermod -a -G wordpress youruser</pre> <br>Then allow group write to /var/www: <br><pre>sudo chgrp -R wordpress /var/www <br>sudo chmod -R g+w /var/www</pre>
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.