edv / docker-spotweb

Dockerfile to easily set up Spotweb using Docker on the Raspberry Pi (or any compatible arm chipset) and regular x86 chipsets
MIT License
29 stars 20 forks source link

Incorrect permissions for /var/lib/nginx #44

Closed pl77 closed 1 year ago

pl77 commented 3 years ago

When trying to upload a custom spotwebfilters.xml file I get a 500 error from NGINX stating:

2021/04/29 15:53:28 [crit] 270#270: *7761 open() "/var/lib/nginx/tmp/client_body/0000000001" failed (13: Permission denied),
client: 0.0.0.0, server: _, request: "POST /?page=editfilter HTTP/1.1", host: "spot.example.com", referrer:
"https://spot.example.com/?page=edituserprefs&userid=2"

The issue is that the /var/lib/nginx/tmp/client_body/ directory has the incorrect permissions.

I repaired this by running a bash command inside the docker container under a root user and setting all directory permissions to abc:root:

chown -R abc:root -- /var/lib/nginx

I'll leave this issue open in case you want to adjust the Dockerfile otherwise feel free to close this. I just figured I could save someone else a bit of time by recording what I figured out as an issue.

edv commented 1 year ago

A lot has changed since this comment. Right now this seems to work, let me know if you do still encounter problems