Link to home
Start Free TrialLog in
Avatar of Luxana
LuxanaFlag for Australia

asked on

webdav - apache2 <Limit> directive

Hello experts,

I have configured webdav and now i'm trying to limit access for user1 however even I implement <limit> directive still user1 can remove files from webdav directory. Not sure what am i doing wrong. Here is my conf file:

NameVirtualHost *
<VirtualHost *>
        ServerAdmin webmaster@localhost
        ServerName gateway.local
        ServerAlias www.gateway.local



        DocumentRoot /home/apache2/gateway.local

        ErrorLog /var/log/apache2/error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog /var/log/apache2/access.log combined
        ServerSignature On

        <Directory /home/apache2/gateway.local/webdav>
        DAV On
        AuthType Digest
        <Limit GET POST PUT CONNECT OPTIONS PATCH PROPFIND PROPPATCH MKCOL COPY MOVE LOCK UNLOCK>
        Require user user1
        </Limit>
        AuthName "webdav_pass_data"
        AuthDigestFile /home/apache2/digest-password
        </Directory>

</VirtualHost>

cadaver output:


 cadaver http://gateway.local/webdav
Authentication required for webdav_pass_data on server `gateway.local':
Username: user1
Password:
dav:/webdav/> ls
Listing collection `/webdav/': succeeded.
        test                                   0  Feb 12 22:23
dav:/webdav/> delete test
Deleting `test': succeeded.
dav:/webdav/> ls
Listing collection `/webdav/': collection is empty.
dav:/webdav/>


Permitions for webdav directory:
ls -alFd webdav/
drwxr-xr-x  2 www-data www-data 1024 2006-02-12 22:24 webdav//

Apache2 is running on debian sarge.


any ideas? thanks for help

ASKER CERTIFIED SOLUTION
Avatar of caterham_www
caterham_www
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Luxana

ASKER

thanks for replay. It helped. Also what was the problem that in order to have read only for public and read and write for authenticated user I needed to have to blocks of <limit> directives:-)) Anyway thanks again for help.

lubos