Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Sat Jun 16, 2012 7:26 am 
Offline
Junior Member

Joined: Wed Jun 13, 2012 2:38 am
Posts: 27
Hi, I'm new to setting permissions for a web server.

To the online user browsing our website, everything appears to be perfect. I've disabled root login and I'm using my one sudo user to log in via FTP, using WinSCP. I'm running a straight html site at the root web folder (/home/user/public/website.com/public/) and I have a WP blog running in a subfolder there. My problem is that I must have the ownership messed up for the folders because I can't write files via FTP. Is it possible that I've flipped the ownership/user? I would appreciate any advice that you may have as to how I can properly set up chmod and chown for this site. If you see anything here that looks to open to security issue also, please let me know. Thanks!

Working down the folders from /home/user/, I have this right now ('user' is standing in for my actual sudo username):

Quote:
drwxr-xr-x 4 user user 4096 2012-06-12 12:16 public
drwxrwxr-x 5 user user 4096 2012-05-31 11:16 website.org
drwxr-xr-x 34 user user 12288 2012-06-15 09:42 public <---this is the actual site with index.html
-rw-r--r-- 1 www-data user 28187 2012-06-14 10:05 index.html <---every file in website
drwxr-xr-x 19 www-data user 4096 2012-01-03 17:17 wordpressblog <---every folder in website


Top
   
PostPosted: Sat Jun 16, 2012 7:33 am 
Offline
Junior Member

Joined: Wed Jun 13, 2012 2:38 am
Posts: 27
If I have things backward (which I suspect I do), what is the chown syntax that will fix this? I'd like to maintain the proper www-data ownership and group on the folders and files that require www-data:www-data for wordpress to function (wp-content and uploads).

Thanks!


Top
   
PostPosted: Sat Jun 16, 2012 8:04 am 
Offline
Junior Member

Joined: Wed Jun 13, 2012 2:38 am
Posts: 27
OK. I think I fixed it all. I switched user and www-data recursively on everything below public and then went in and made the www-data:www-data modification to just the wp-content folder and recursively on the uploads folder there. This is resolved I think. In fact I wish I could delete this thread because it turns out that I already knew the answer. Being new to this, I am just being cautious as I make these type of changes.


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


Who is online

Users browsing this forum: No registered users and 1 guest


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