2

I provide shared web-hosting for my customers. PHP works with fast-cgi, ftp access is also no problem. But how do I enable web-dav for my customers? Every customer has its own uid and gid. Apache uses for webdav its own uid/gid.

2 Answers 2

1

There is some explanation about this in the mod_dav FAQ. The proposed options are:

  1. You can request Apache to do setuid (but this requires Apache to run as root, which is specifically discouraged)
  2. You can run an Apache instance for each customer
  3. You can try to find a WebDAV server in PHP or CGI and then use something like suphp or suexec
0

Try setting some auth directives in your location section:

eg.

<Location /webshare/>
DAV On
AuthType Basic
AuthName "Editing Restricted"
AuthUserFile /home/httpd/vhosts/XXXXXXX.com/.DAVlogin
<LimitExcept GET HEAD OPTIONS>

Require user wbuser
</LimitExcept>
</Location> 

That will ensure that anyone trying to see the files will have to supply credentials. You'll have to set the dav directory so apache's gid can see it though, but no-one should be able to view files without authenticating with the directories .DAVlogin file, which will only contain passwords for that site's user.

You must log in to answer this question.