wiktorn / Overpass-API

Overpass API docker image
MIT License
142 stars 51 forks source link

Permission denied on some files #123

Open greenscientist opened 7 months ago

greenscientist commented 7 months ago

I recreated my Overpass setup in my Kubernetes environment and I got a few permission denied error.

Extract from my log: 2024-03-26T06:13:51.760964953Z tee: /db/changes.log: Permission denied 2024-03-26T06:13:51.761041418Z mkdir: cannot create directory ‘/db/diffs’: Permission denied

The source of the problem is that the /db/ directory is now owned by root and this the overpass user cannot create those files. I was able to pinpoint the change to commit https://github.com/wiktorn/Overpass-API/commit/26e5b3fe4e8994333b915daff794693fcb4d4546 which did change how we set the permissions on the directory. A revert of the commit works well for me. I don't know if we'd prefer to find a more fine grained solution to the original problem or just go back to what it was.

greenscientist commented 7 months ago

@wiktorn After your change, getting another permission error:

2024-04-02T23:07:42.282061249Z /app/bin / 2024-04-02T23:07:42.289674647Z cp: cannot create regular file '/db/replicate_id.backup': Permission denied

Xyaren commented 1 month ago

chown overpass:overpass /db/ /db/replicate_id worked for me