Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

privilegs problem in mounted /etc/qgisserver path #163

Open
pvgenuchten opened this issue Jun 17, 2021 · 3 comments
Open

privilegs problem in mounted /etc/qgisserver path #163

pvgenuchten opened this issue Jun 17, 2021 · 3 comments

Comments

@pvgenuchten
Copy link

qgis tries to create files in /etc/qgisserver which is a mounted volume on the host. (the user running) qgis was not authorised to write in the folder.

we only got it working by not mounting /etc/qgisserver, but mount an alternative path and set the path to the project file explicitly

    environment:
      - QGIS_PROJECT_FILE:/myqgisserver/project.qgs
 
    volumes:
      - ./data:/myqgisserver

maybe you can mention this aspect in docs?

@yjacolin
Copy link
Member

Hello,

I can't reproduce the problem with this command:

docker run --rm --publish=8380:80 -e QGIS_PROJECT_FILE=/etc/qgisserver/project.qgz --volume=$PWD/qgisserver:/etc/qgisserver camptocamp/qgis-server

So I guess it is just a matter of "chmod" the directory in the host. I will try to investigate. Which right do you have on your directory?

Y.

@pvgenuchten
Copy link
Author

pvgenuchten commented Jun 19, 2021

Thanx for checking @yjacolin. @justb4 any idea how the image could be improved/overridden to match our scenario? @yjacolin fyi we deploy qgis with ansible/traefik in a subfolder like https://github.com/Geonovum/ogc-api-testbed/blob/main/services/qgis/docker-compose.yml

@justb4
Copy link

justb4 commented Jun 25, 2021

@yjacolin @pvgenuchten AFAICT a mechanism is needed similar to what we use with GeoServer Docker, see our docker-compose.yml.
We pass the UID and GID of the host's local user that starts the Container. The Container's main process (Tomcat for GS) will run under those id's. For now quickfix-ed with chmod 777 within the host on the mounted dir, but a more elegant solution is welcomed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants