Re: [OSGeoLive] MapCache Permissions
On 2019-07-25 11:05, Seth G wrote: Bas - where is the best place to find these details? Are there docs, The cache directory is not explicitly documented. We could add README.Debian to document this, but the path is FHS compliant and shouldn't need explicit docs. or is it best to look at the packaging scripts? That's always a good idea. I found where it is set at https://salsa.debian.org/debian-gis-team/mapcache/blob/master/debian/libapache2-mod-mapcache.postinst Just to note the main MapCache doc uses /tmp for the cache. I tried this originally but no other user can then access the tiles (which can be very useful for resuing and checking caches). Apparently it: is from a feature of systemd called PrivateTmp. If httpd writes something to /tmp, it will be in /tmp/systemd-private-*-httpd.service-* The FHS documents /var/cache for application cache data, see: https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch05s05.html MapCache upstream should consider being compliant by default. Kind Regards, Bas ___ osgeolive mailing list osgeolive@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/osgeolive
Re: [OSGeoLive] MapCache Permissions
Thanks both. I tested with /var/cache/mapcache and it works directly without any need to create folders/update permissions, which will simplify the install script a little. I'll make a new pull request with this path. Bas - where is the best place to find these details? Are there docs, or is it best to look at the packaging scripts? I found where it is set at https://salsa.debian.org/debian-gis-team/mapcache/blob/master/debian/libapache2-mod-mapcache.postinst Just to note the main MapCache doc uses /tmp for the cache. I tried this originally but no other user can then access the tiles (which can be very useful for resuing and checking caches). Apparently it: > is from a feature of systemd called PrivateTmp. > If httpd writes something to /tmp, it will be in > /tmp/systemd-private-*-httpd.service-* Seth -- web:http://geographika.co.uk twitter: @geographika On Thu, Jul 25, 2019, at 5:43 AM, Sebastiaan Couwenberg wrote: > On 7/24/19 10:16 PM, Angelos Tzotsos wrote: > > I would recommend to move the mapcache folder to /usr/local/share/mapcache > > That's a bad recommendation FHS-wise. > > /var/cache/mapcache is provided by libapache2-mod-mapcache for cache data. > > Kind Regards, > > Bas > > -- > GPG Key ID: 4096R/6750F10AE88D4AF1 > Fingerprint: 8182 DE41 7056 408D 6146 50D1 6750 F10A E88D 4AF1 > ___ > osgeolive mailing list > osgeolive@lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/osgeolive > ___ osgeolive mailing list osgeolive@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/osgeolive
Re: [OSGeoLive] MapCache Permissions
Hi Seth, I would recommend to move the mapcache folder to /usr/local/share/mapcache Best, Angelos On 7/24/19 6:04 PM, Seth G wrote: Hi, I'm currently testing the latest beta from http://aiolos.survey.ntua.gr/gisvm/dev/osgeolive-nightly-build163-amd64-38dc97a-master.iso with MapCache. There is a permssions issue causing tiles to return "failed to create directory /home/user/mapcache/tilecache..Permission denied" The https://github.com/OSGeo/OSGeoLive/blob/master/bin/install_mapcache.sh#L44 script runs the following: # make a folder for the tilecache abd set the owner to be www-data MAPCACHE_DIR=/home/user/mapcache mkdir -p "$MAPCACHE_DIR/tilecache" chown -R www-data:www-data "$MAPCACHE_DIR/tilecache" On the latest release the owner of /home/user/mapcache/tilecache is still "user". If I run these manually (with sudo) on the latest release everything works correctly. The Zoo installer also has a similar approach: https://github.com/OSGeo/OSGeoLive/blob/master/bin/install_zoo-project.sh#L77 It refers to ticket https://trac.osgeo.org/osgeolive/ticket/1850 which has discussions of folder locations for a tile cache. Should I update the install/configs to point to /var/mapcache/tilecache to keep the permssions? I presume ownership of the folder is changed in a later script, or is not advised. Seth -- web:http://geographika.co.uk twitter: @geographika ___ osgeolive mailing list osgeolive@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/osgeolive -- Angelos Tzotsos, PhD Charter Member Open Source Geospatial Foundation http://users.ntua.gr/tzotsos ___ osgeolive mailing list osgeolive@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/osgeolive