qwc-services / qwc-docker

Docker containers for qwc-services
MIT License
48 stars 36 forks source link

QWC-docker Permission denied #40

Closed demtotal closed 2 years ago

demtotal commented 2 years ago

Greetings everyone,

I'm new to qwc-services i started following these tutorials: https://qwc.sourcepole.com/quick-start/ https://docs.qgis.org/3.22/en/docs/server_manual/getting_started.html#serve-a-project The firsts steps worked well, however i don't really understand how to add new qgis projects to the webmap, i tried to add a simple Qgis project qgs file with one shapefile layer i've put them to the folder volumes/config-in/default/qgis_projects/ as specified by the first tutorial but i get the following error (Note: i'm working on centOS) issue

Another question should i edit the themesConfig file manually to add the project to the web client (demo app) ? If you know a more detailled tutorial tell me please.

Thanks in advance.

demtotal commented 2 years ago

I've also tried to execute this command sudo chmod a+rwx on all folder and files and now i get this error issue2

manisandro commented 2 years ago

I've enchanced the README of the project a bit, see i.e. https://github.com/qwc-services/qwc-docker#adding-qgis-projects

The errors you get look like file permission errors, make sure that the volumes are mounted read-write in docker-compose.yml and that the folders are writeable.

demtotal commented 2 years ago

And how to do that ? i'm working on centOS: command sudo chown -R www-data:www-data volumes/qgs-resources doesn't work because www-data does not exist i tried to replace it with apache but facing same problem For volume mount aren't they already configured in docker-compose.yml ? i haven't yet changed the original file that i pulled from this repo.

demtotal commented 2 years ago

issue_dock here's the docker-compose log when trying to click on Generate service configuration on admin gui

manisandro commented 2 years ago

Probably www-data isn't accurate resp general, as a short-term fix if you chmod 666 the files or 777 the directory it should get you going.

demtotal commented 2 years ago

Thank you i will try it!

demtotal commented 2 years ago

@manisandro Thanks for your instructions now it's running!

manisandro commented 2 years ago

There is now a better way to handle this, by overriding the UID/GID which runs the uwsgi services. See the updated README and the upgrade notes for details.

demtotal commented 2 years ago

Thanks for reviewing the issue and for your effort and the continuous improvement of the QWC services, i really appreciate it !