configure apache/webdav readonly for user x, read/write for user y

Posted by user82296 on Server Fault See other posts from Server Fault or by user82296
Published on 2011-07-26T23:23:30Z Indexed on 2012/10/26 5:05 UTC
Read the original article Hit count: 530

Filed under:
|

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

© Server Fault or respective owner

Related posts about permissions

Related posts about webdav