Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: /var/www permissions
PostPosted: Wed Apr 04, 2012 9:40 am 
Offline
Newbie

Joined: Wed Mar 28, 2012 8:37 am
Posts: 3
Hi

I installed lighttpd. Then I want to give to user "xxx" the permissions to upload in the directory /var/www/foobar.com/htdocs.

So my commands were:

# chmod g+w .
# chmod -R g+rw /var/www
# chown www-data:xxx /var/www/foobar.com/htdocs

but any file I create in the directory from my user can't be read from the web server.

If I give:

# chmod www-data:xxx /var/www/foobar.com/htdocs
I can't do anything in the directory
if I give:
#chmod xxx:www-data /var/www/foobar.com/htdocs
the web server can't read the content in it.

What would you advise?


Top
   
 Post subject:
PostPosted: Fri Apr 06, 2012 8:50 am 
Offline
Senior Member
User avatar

Joined: Sun Jan 18, 2009 2:41 pm
Posts: 830
What is the group ownership for the files you create as user xxx? If it's not www-data, then the server won't be able to read them; you need to chgrp www-data filename ... them.

Note that having your web directories/files writeable by the web server is a potential security risk.


Top
   
 Post subject:
PostPosted: Tue Apr 10, 2012 9:10 pm 
Offline

Joined: Mon Mar 26, 2012 2:08 am
Posts: 1
You could add user www-data to group xxx and set all the files under foobar.com/htdocs to be owned by xxx:xxx. You'd have to restart lighttpd to get the group permissions working. That would give your xxx user the ability to edit their content and give lighttpd access to the content through the xxx group.


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


Who is online

Users browsing this forum: No registered users and 8 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