BytemarkHosting / docker-webdav

Docker image for running an Apache WebDAV server
MIT License
350 stars 166 forks source link

What about supporting a READ_ONLY mode #7

Open amandel opened 5 years ago

amandel commented 5 years ago

Hi, thanks for this "generic" container. I wanted to expose a read only directory via web-dav but fail whewn it comes to the line: chown -R www-data:www-data "/var/lib/dav" in the docker-entrypoint.sh. Not sure if there are other pitfalls for this "mode"?

Kind regards, Andreas.

bodiroga commented 5 years ago

+1

LJRH commented 4 years ago

+1

dokbua commented 4 years ago

Came her for this problem - started this container on an existing data store and found all ownership suddenly changed to 82.
I'm not sure what this has to do with supporting a READ_ONLY mode. The issue is the container starts attempting to change ownership's, something that it should not do. If ownership needs to be changed the user can do that manually. I realize it's only a matter of commenting this line in docker-entrypoint.sh, but that will just get overwritten by the first update coming around. Suggest to remove the line in the distro, or at least explain clearly what it does, lest it breaks something or at least save users from having to chase the issue when ownership suddenly are found to have been changed.

rochr4 commented 4 years ago

I tried to run container as a user to no avail, if container could run as a user then it could also honor :ro flag (eg. - /home/roch/.webdav_symlinks/EXAMPLE:/var/lib/dav/data:ro ) so files would preserve ownership and be RO at one time.

eg. of yml file:

environment:

antoinedray commented 2 years ago

+1

nickv2002 commented 2 years ago

I made some small tweaks as suggested @dokbua above and created a PR: https://github.com/BytemarkHosting/docker-webdav/pull/35 to tweak things to allow read only mounts.