Opened 2 months ago

Closed 3 weeks ago

#2371 closed defect (fixed)

QGIS Server demo problems

Reported by: darkblueb Owned by: osgeolive@…
Priority: critical Milestone: OSGeoLive15.0
Component: OSGeoLive Keywords: qgis_server
Cc:

Description

build93 test shows warning: Non-existing plugin: IdentifyRegion

[Wed Jun 22 22:16:15.753009 2022] [mpm_prefork:notice] [pid 1239] AH00163: Apache/2.4.52 (Ubuntu) mod_fcgid/2.3.9 mod-mapcache/1.12.0 mod_wsgi/4.9.0 Python/3.10 configured -- resuming normal operations
[Wed Jun 22 22:16:15.753082 2022] [core:notice] [pid 1239] AH00094: Command line: '/usr/sbin/apache2'
Application path not initialized
Application path not initialized
Application path not initialized
Application path not initialized
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-www-data'
QFSFileEngine::open: No file name specified
Warning 1: Unable to find driver ECW to unload from GDAL_SKIP environment variable.
Warning 1: Unable to find driver ECW to unload from GDAL_SKIP environment variable.
Warning 1: Unable to find driver JP2ECW to unload from GDAL_SKIP environment variable.
ERROR: Auth db directory path could not be created
"Loading native module /usr/lib/qgis/server/libdummy.so"
"Loading native module /usr/lib/qgis/server/liblandingpage.so"
"Loading native module /usr/lib/qgis/server/libwcs.so"
"Loading native module /usr/lib/qgis/server/libwfs.so"
"Loading native module /usr/lib/qgis/server/libwfs3.so"
"Loading native module /usr/lib/qgis/server/libwms.so"
"Loading native module /usr/lib/qgis/server/libwmts.so"
<string>:1: DeprecationWarning: setapi() is deprecated

Change history (8)

comment:1 by sanak, 4 weeks ago

Well, warning: Non-existing plugin: IdentifyRegion issue is still remaining, but to show natural earth map on the browser client, just the following permission setting seems to be enough.

sudo chmod 755 /home/user

I found it from the following Japanese article.
http://verifiedby.me/adiary/0164

20.04まではこれで良かったのですが、22.04ではこれだけではpublic_htmlが見えません。どうやら22.04から、各userのhome directoryのpermissionのdefaultが755から750に変わったようです。

sudo chmod 755 /home/kashi

としたら見えるようになりました。

---

By the way, during the investigation, I modified /etc/apache2/conf-available/qgis-fcgid.conf as follows, then run sudo service apache2 --full-restart.

<IfModule mod_fcgid.c>
  FcgidCmdOptions /usr/lib/cgi-bin/qgis_mapserv.fcgi \
    InitialEnv QGIS_SERVER_LOG_STDERR=1 \
    InitialEnv QGIS_SERVER_LOG_LEVEL=1 \
    InitialEnv QGIS_SERVER_IGNORE_BAD_LAYERS=1 \
    MaxProcesses 6
</IfModule>

Just additional information.

comment:3 by kalxas, 4 weeks ago

I am not sure if home user folder permissions are related to this issue. Does QGIS Server read anything from the user home folder?

comment:4 by kalxas, 4 weeks ago

This is definitely a HUGE bug, QGIS Server should NOT force a user make his home folder public.

I have changed the permissions on /usr/local/share/qgis to be more relaxed, but setting 755 on /home/user is definitely not acceptable.

We need some help to configure QGIS Server in a way to not read anything from /home/

in reply to:  4 comment:5 by sanak, 4 weeks ago

Okay, then changing QGIS project file's shape file paths from /home/user/data/natural_earth2/*.shp to /usr/local/share/data/natural_earth2/*.shp may make sense.

https://github.com/OSGeo/OSGeoLive/pull/336#discussion_r926707808

Well, the following QGIS project file reads shape files from /home/user/data/natural_earth2/*.shp.
https://github.com/OSGeo/OSGeoLive/blob/master/app-data/qgis/QGIS-NaturalEarth-Example.qgz
+- /home/user/data/natural_earth2/ne_10m_lakes.shp
+- :

I will try to change those, later.

---

By the way, the following English article describes Ubuntu 22.04 home user folder permission change (755=>750).
And it also mentions that my suggestion way is "less secure" one. :)
https://www.techrepublic.com/article/big-change-samba-ubuntu/

Last edited 4 weeks ago by sanak (previous) (diff)

comment:6 by sanak, 4 weeks ago

I changed QGIS project file's shape path in the following PR.
https://github.com/OSGeo/OSGeoLive/pull/340
FYI

comment:7 by kalxas, 3 weeks ago

Thank you, I have merged and going to test in the next nightly build.

comment:8 by kalxas, 3 weeks ago

Resolution: fixed
Status: newclosed

Fixed in build148

Note: See TracTickets for help on using tickets.