[ale] WebDAV configuration? (maybe slightly OT)

Michael H. Warfield mhw at WittsEnd.com
Thu Apr 24 10:56:23 EDT 2014


On Thu, 2014-04-24 at 08:57 -0400, Jeff Layton wrote:
> Good morning,

> I have a question that might be more topical than my cygwin
> question (I hope). My goal is to set up WebDAV on a Linux
> server so that each user can get to their own files. If I'm user
> "layton" I want to get to /home/layton with no one else
> getting to the files that doesn't have permission.

> I've gotten WebDAV working on the server (CentOS 6.5) but
> I've got a couple of questions about further configuration.

> 1. I have to set up a user/pwd using htpasswd. Is there a
> way to get httpd to use the server user/pwd? (not a huge
> deal but just for convience). Right now, I define a user name
> and pwd for http that is different than the system user/pwd
> (htpasswd -c /etc/httpd/webdav.users.pwd layton).


> 2. Right now I have /etc/httpd/conf.d/webdav.conf defined as,

>   <IfModule mod_dav.c>
>      LimitXMLRequestBody 131072
> 
>      Alias /webdav "/home/httpd/webdav"
>      <Directory /home/httpd/webdav>
>          Dav On
>          Options +Indexes
>          IndexOptions FancyIndexing
>          AddDefaultCharset UTF-8
>          AuthType Basic
>          AuthName "WebDAV Server"
>          AuthUserFile /etc/httpd/webdav.users.pwd
>          Require valid-user
>          Order allow,deny
>          Allow from all
>      </Directory>
>   </IfModule>


> This means that people get dumped to /home/http/webdav.
> I want the ability to do something like:


> <IfModule mod_dav.c>
>      LimitXMLRequestBody 131072
> 
>      Alias /webdav/layton "/home/layton"
>      <Directory /home/layton>
>          Dav On
>          Options +Indexes
>          IndexOptions FancyIndexing
>          AddDefaultCharset UTF-8
>          AuthType Basic
>          AuthName "WebDAV Server"
>          AuthUserFile /etc/httpd/webdav.users.layton.pwd
>          Require valid-user
>          Order allow,deny
>          Allow from all
>      </Directory>
> 
>      Alias /webdav/susy "/home/susy"
>      <Directory /home/susy>
>          Dav On
>          Options +Indexes
>          IndexOptions FancyIndexing
>          AddDefaultCharset UTF-8
>          AuthType Basic
>          AuthName "WebDAV Server"
>          AuthUserFile /etc/httpd/webdav.users.susy.pwd
>          Require valid-user
>          Order allow,deny
>          Allow from all
>      </Directory>
>   </IfModule>


> I define a different password file for each user (a pain
> but the user count isn't too large).

I usually use client / user certs.

> Then when the user
> goes to the URL for their home directory such as
> /webdav/layton it will use the correct pwd file and connect
> the user to their home directory.

> When I try restarting http I get the following error:

> Starting httpd: [Thu Apr 24 08:41:18 2014] [warn] The Alias directive in 
> /etc/httpd/conf.d/webdav.conf at line 18 will probably never match 
> because it overlaps an earlier Alias.

> (irnoge the line name - it may not match the file but it
> refers to the second Alias in the webdav.conf file).

> Any suggestions? I'll take pointers on where to ask the questions
> as well (I've been googling and looking for places to ask the
> question with not luck at this point).

For that, I would use symlinks out of the base Webdav directory pointing
at the user home directories and enable FollowSymLinks.  A lot less
hassle.

> Thanks!
> 
> Jeff
> 
> 
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo
> 

-- 
Michael H. Warfield (AI4NB) | (770) 978-7061 |  mhw at WittsEnd.com
   /\/\|=mhw=|\/\/          | (678) 463-0932 |  http://www.wittsend.com/mhw/
   NIC whois: MHW9          | An optimist believes we live in the best of all
 PGP Key: 0x674627FF        | possible worlds.  A pessimist is sure of it!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 482 bytes
Desc: This is a digitally signed message part
URL: <http://mail.ale.org/pipermail/ale/attachments/20140424/10f6fca6/attachment-0001.sig>


More information about the Ale mailing list