How to allow read access to all users and writes to some specific with apache/webdav?
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How to allow read access to all users and writes to some specific with apache/webdav?
Hi everybody,
I have a server containing information that should be readable by all users, while only admin users should be allowed to write.
One of my attempts was to use two <Directory> directives referring to the same path, the first to grant read only access, the second to grant write access to authenticated and specific users only.
The first part sounds easy, when you talk about it, but I did not find a solution yet.
comment = share folder
path = /home/folder
browseable = yes
valid users = user1,user2,user3,user4
invalid user =
read list = user1,user2
write list = user3,user4
writable = yes
create mask = 0744
guest ok = no
This stuff if for samba kashifazizawan!
You can use limit, here is a snippet:
Quote:
<ifmodule mod_dav.c>
<directory /path/to/webdav/>
allow from 127.0.0.1 ::1
allow from 192.0.2.1
# other allowed clients
Dav on
AuthType Basic
AuthName "MySystemName WebDAV Storage"
AuthUserFile /path/to/web/etc/passwd.dav
Require valid-user
# These are the HTTP methods used in DAV, beyond the usual GET/HEAD/OPTIONS
# <limit put post delete propfind proppatch mkcol copy move lock unlock>
# Require user administrator
# </limit>
</directory>
or something like,
Quote:
<directory /path/to/webdav/sensitive/>
<limitexcept get options propfind>
Require user administrator
</limitexcept>
</directory>
just explore more oh how you want to limit some other users.
Sorry, I have to correct myself: the above configuration allows or not deleting depending on the object you are managing. In particular it is not possible to delete or rename directories, while it is possible to delete files.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.