LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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, 02:57 PM   #1
dilettante9
Member
 
Registered: Jun 2012
Location: U.S.
Distribution: Debian, Xubuntu
Posts: 46

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 02:59 PM.
 
Old 06-02-2015, 04:39 PM   #2
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,504

Rep: Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489
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, 07:05 PM   #3
dilettante9
Member
 
Registered: Jun 2012
Location: U.S.
Distribution: Debian, Xubuntu
Posts: 46

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



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 07:18 AM
[SOLVED] chown: invalid user 'www-data:www-data' thund3rstruck Linux - Server 4 03-21-2013 01:53 AM
Give www-data permission to sudo dangibas Programming 5 08-30-2010 01:35 PM
Problem user www-data on ubuntu mosesdel Linux - Server 2 03-31-2009 06:45 PM
Giving user 'www-data' same permissions as normal user MikeOfAustin Linux - Software 5 06-08-2007 02:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:02 AM.

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
Open Source Consulting | Domain Registration