LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Samba-Apache-Webdav permission problem with user www-data (https://www.linuxquestions.org/questions/linux-newbie-8/samba-apache-webdav-permission-problem-with-user-www-data-4175544293/)

dilettante9 06-02-2015 02:57 PM

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.)

yancek 06-02-2015 04:39 PM

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.

dilettante9 06-07-2015 07:05 PM

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.


All times are GMT -5. The time now is 01:09 PM.