nagimov / agendav-docker

Docker image for agendav
MIT License
30 stars 14 forks source link

Fix permissions on mounted settings #28

Open Lxtharia opened 7 months ago

Lxtharia commented 7 months ago

I wanted to mount my settings.php, but the sed -i commands in run.sh do not work on "busy files", so this uses a temporary file which will be written to the mounted file after it is edited. But because the sed -i commands were also responsible of changing the permissions of the files from ownership root to www-data[^1], we also need to correct the permissions in the Dockerfile

[^1]: Took me a while to debug this. But apparently, if you have a file owned by root in a directory owned by you, you can remove it. This is what sed -i essentially does, but it looks like it "changed ownership".