BytemarkHosting / docker-webdav

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

Change entrypoint to work with read only mounts #35

Open nickv2002 opened 2 years ago

nickv2002 commented 2 years ago

The readme encourages use of mounting directories under /var/lib/dav/data but

  1. It's bad practice to chown any volume/bind mounts to this directory because it might mess up permissions on the host machine
  2. Trying to chown a readonly (ro) mount will fail and crash the container.

So I changed the chown commands to be more restrictive here to avoid those problems. Work fine for my own testing where I read only bind mount a directory under /var/lib/dav/data

This could possibly be version 2.5 but maybe worthwhile to combine with other changes. Thanks!