3liz / lizmap-docker-compose

Run Lizmap stack with docker-compose
31 stars 42 forks source link

Permission denied with nginx #17

Closed katagen closed 3 years ago

katagen commented 3 years ago

Hi, I was able to install everything on my Synology NAS through SSH. My problem is that the container "docker_web_1" (nginx) constantly stops working cause of a "permission denied".

nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (13: Permission denied)

and

2021/06/07 16:23:13 [emerg] 1#1: mkdir() "/var/cache/nginx/client_temp" failed (13: Permission denied)

I made all the installation as ROOT (sudo -i), so I can't understand the problem... Any idea? Thank you for the help...

dmarteau commented 3 years ago

Because the nginx is not configured to run as root: https://github.com/3liz/lizmap-docker-compose/blob/master/docker-compose.yml#L51

Please consider that this is a sample configuration for testing Lizmap web client with QGIS features: if you want use it on a production server you will need to make adjustments for meeting your production requirements.

katagen commented 3 years ago

I found the solution: I gave +x access to the folders that nginx needs to connect to!