Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: User permissions
PostPosted: Mon Oct 21, 2013 9:44 am 
Offline
Senior Newbie

Joined: Mon Oct 21, 2013 3:24 am
Posts: 9
Hi,

I successfully installed everything on my ubuntu linode (nginx, php-fpm etc) for my wordpress website.
I created additional user "someuser", disabled root login, and password authentication. By following themesforge tutorial - I did chown of my site folder, and owner of site files is www-data.

That's ok, wp works, I can install plugins, update plugins, but I can't do anything with my FTP, cause my user "someuser" is not owner of the files. I get that.
If I chown site files, and file owner is my "someuser" instead of www-data, I can edit files via FTP, but wp updates, plugin installations are not working.

How can I solve this? I want to be able to use FTP and WP to be able to install plugins from backend?


Top
   
 Post subject: Re: User permissions
PostPosted: Mon Oct 21, 2013 10:27 am 
Offline
Senior Member

Joined: Mon Jan 02, 2012 12:45 pm
Posts: 365
I don't know about nginx, but on apache here's what we do:

USER / GROUP
someuser / www-data ~~ for the site's main directory (/var/www/someuser)
someuser / www-data ~~ for the site's content directory (/var/www/someuser/mysite.com)
someuser / someuser ~~ for all the files in the site we want available for SFTP.

For files we don't want to be available to SFTP we change the user to another user.


Top
   
 Post subject: Re: User permissions
PostPosted: Wed Oct 30, 2013 9:46 pm 
Offline
Senior Newbie

Joined: Wed Oct 30, 2013 9:22 pm
Posts: 7
1. chmod 711 /home/someuser
2. chown -R someuser:someuser /home/someuser
3. chmod -R 755 /home/someuser/*

Then, go into the WordPress directory and chmod -R 775 any plugins folders or anything you need writable specifically.

You should also go add someuser in as a worker in nginx.conf (then restart):
http://forum.nginx.org/read.php?11,2664,2684

The configuration you have with someuser:www-data should work, so that leads me to think it's just a chmod permissions issue. I just find it easier to maintain when all of the files in a /home/user folder are owned by user.

Hope this assists. :-)


Top
   
 Post subject: Re: User permissions
PostPosted: Wed Oct 30, 2013 10:45 pm 
Offline
Senior Member
User avatar

Joined: Wed Jun 26, 2013 1:53 am
Posts: 118
You should create a group, add yourself to that group, and set the files to be owned by www-data and that group. Don't use sudo. It needs to be another group that you make that isn't related to requiring use of sudo.

_________________
Homepage www.sturmkrieg.com
Social network Gamernet
Development website Sashaweb Development
Imageboard img.sturmkrieg.com
WikiHub free wiki host Community Wiki


Top
   
 Post subject: Re: User permissions
PostPosted: Fri Nov 01, 2013 5:43 pm 
Offline
Senior Member

Joined: Sun Aug 31, 2008 4:29 pm
Posts: 177
Or you can add www-data to your group (e.g., group 'someuser').

Then, when you want a directory, or file, to be writable by www-data, you simply make it group-writable. This you can do via SSH or FTP as user 'someuser'. An ordinary user can modify directory/file permissions but cannot change ownership.

_________________
sleddog


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group