LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-02-2015, 03:57 PM   #1
dilettante9
Member
 
Registered: Jun 2012
Location: U.S.
Distribution: Debian, Xubuntu
Posts: 39

Rep: Reputation: Disabled
Samba-Apache-Webdav permission problem with user www-data


I'm not sure if this should be in the newbie section, but I am somewhat of a newbie, so here goes:

In a home network, I have an Xubuntu file server with a Samba share that has me as the owner and authorizes me to access the share.

On another computer, I have Mint running and providing various services, including webdav on Apache with SSL. In the var/www/webdav directory of the Mint computer, I have the Xubuntu Samba share mounted. This is supposed to allow me to access the Samba share from the public internet.

Everything works fine except for one big problem: Apache requires the owner of the webdav directory to be user "www-data," and I can't figure out how to give www-data access to the Samba share, since www-data is not a user on the Xubuntu computer, and moreover I don't know the password for user www-data.

Can anyone figure out how to get around this problem? In particular, is there a way to configure the Samba share on the Xubuntu computer so that user www-data on the Mint computer can have access to it?

(Incidentally, I have my reasons for using two computers, one as a file server and one as a web server. Also, I am thinking about switching to NFS instead of Samba, but I'm not sure if even that would solve my problem.)

Last edited by dilettante9; 06-02-2015 at 03:59 PM.
 
Old 06-02-2015, 05:39 PM   #2
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,869

Rep: Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247
Quote:
Apache requires the owner of the webdav directory to be user "www-data
It isn't Apache that requires this. Debian/Ubuntu and their derivatives such as Mint/Xubuntu use www-data as the owner:group for apache web server directories. Most Linux systems use apache:apache. This is a system user:group and there is not password. If you want a specific user to have access you would put that user in the www-data group. If you want the users in the www-data group to have access to the Samba share, you would need to put them in whatever group the Samba mount is in with permissions you desire.
 
1 members found this post helpful.
Old 06-07-2015, 08:05 PM   #3
dilettante9
Member
 
Registered: Jun 2012
Location: U.S.
Distribution: Debian, Xubuntu
Posts: 39

Original Poster
Rep: Reputation: Disabled
Thanks, Yancek. I forgot to respond earlier, but your post was helpful in getting my problem solved. It helped me formulate my thoughts regarding the permissions. in particular, adding www-data to the group of the user authorized to access the samba share was what needed to be done. I think that might be just a tad bit of a security risk, in case someone on the public internet hijacks the www-data account somehow, but I've used a very strong password, so that seems unlikely.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache can't access directory with permission www-data AlexRsk Linux - Newbie 1 10-30-2014 08:18 AM
[SOLVED] chown: invalid user 'www-data:www-data' thund3rstruck Linux - Server 4 03-21-2013 02:53 AM
Give www-data permission to sudo dangibas Programming 5 08-30-2010 02:35 PM
Problem user www-data on ubuntu mosesdel Linux - Server 2 03-31-2009 07:45 PM
Giving user 'www-data' same permissions as normal user MikeOfAustin Linux - Software 5 06-08-2007 03:50 AM


All times are GMT -5. The time now is 10:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration