4

I'm using Apache 2.2 on RHEL 6.x. I can get webdav setup as readonly for user x or readwrite for user x but can't figure out how to make it read only for user x and read/write for user y. I just have a single folder /var/www/html/davtest owned by apache:apache and I want myUser to have readonly access and myAdmin to have read/write access. So far I've only been able to control this by modifying the permissions on the dir /var/www/html/davtest (e.g. if apache has rw then no matter how I set limitExcept below either user can read/write

Is this in general possible?

<Directory /var/www/html/davtest >
    DAV on
    Options Indexes
    AuthType Digest
    AuthName myAuth
    AuthDigestDomain /myD/ http://mysys.x.y/davtest
    AuthDigestProvider file
    AuthUserFile /var/www/davDigest/dav_pw
    require user readOnlyUser
    <limitExcept get head options>
        require user myAdmin
    </limitExcept>
</Directory>

I've tried various permutations with Limit, LimitExcept and it appears that the only thing that determines who can read/write to the share are the permissions on the files/folders in the share.

any guidance, pointers to docs would be greatly appreciated. thanks

2 Answers 2

5

Figured it out the crucial component is PROPFIND The settings below require a valid user for read-only access, for writing/delete/modification requires myAdmin

<Location /myDav >
    DAV on
    Options Indexes

    AuthType Digest
    AuthName YSM-iPad
    AuthDigestDomain /myDav http://my.path.to.server/myDav 
    AuthDigestProvider file
    AuthUserFile /var/www/davConf/.davpw
    Order allow,deny
    allow from my.domain

    <Limit GET OPTIONS PROPFIND>
            require valid-user
    </Limit>

    <LimitExcept GET OPTIONS PROPFIND>
            require user myAdmin
    </LimitExcept>

0

How about something like this:

<Directory /var/www/html/davtest >
DAV on
Options Indexes
AuthType Digest
AuthName myAuth
AuthDigestDomain /myD/ http://mysys.x.y/davtest
AuthDigestProvider file
AuthUserFile /var/www/davDigest/dav_pw
<limit get head options>
    require user readOnlyUser
    require user myAdmin
</limit>
<limitExcept get head options>
    require user myAdmin
</limitExcept>
</Directory>

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .