BytemarkHosting / docker-webdav

Docker image for running an Apache WebDAV server
MIT License
364 stars 174 forks source link

Starting the container changes folders owners #24

Open paolobasso99 opened 4 years ago

paolobasso99 commented 4 years ago

Hi, When I start this docker container the owner of the folders shared using volumes in my Ubuntu server changes to 82:82. Is this a wanted behavior?

I am using this docker-compose.yml :

mediabox-webdav:
    image: bytemark/webdav
    container_name: mediabox-webdav
    environment:
      - USERNAME=${WEBDAV_USERNAME}
      - PASSWORD=${WEBDAV_PASSWORD}
    volumes:
      - /mediabox:/var/lib/dav/data/mediabox
      - /downloads:/var/lib/dav/data/downloads
    restart: unless-stopped

The owner of both /mediabox and /downloads becomes 82:82,is there a way to avoid this and keep the original owner?

isyangban commented 4 years ago

I have the same problem. After looking at the code a bit

https://github.com/BytemarkHosting/docker-webdav/blob/801daf3cc929be308555c0267a6e6a885594bed2/2.4/docker-entrypoint.sh#L104

This changes the permissions of the mapped volume. I think there should be an option to run apache with a specified user rather than changing all the permissions of the mapped volume.