[mapserver-users] Σχετ: CONGIG MS_ERRORFILE ownership
Stephen Woodbridge
woodbri at swoodbridge.com
Thu Apr 13 13:07:11 PDT 2017
On 4/13/2017 2:54 PM, Stefanos Anastasiou wrote:
> Hello Stephen,
> Thank you.!! I works. I thought that the errofile is created every
> time you run the app.
>
> Regarding Python Mapscript: we put the script in DocumentRoot and run it
> the browser like http://localhost/script.py ??
You probably need to put it in cgi-bin directory and then access it via
http://localhost/cgi-bin/script.py
-Steve
> Στις 9:27 μ.μ. Πέμπτη, 13 Απριλίου 2017, ο/η Stephen Woodbridge
> <woodbri at swoodbridge.com> έγραψε:
>
>
> On 4/13/2017 1:26 PM, Stefanos Anastasiou wrote:
>
> > Hello list,
> > I noticed that when I set the CONFIG "MS_ERRORFILE"
> > "/home/stefanos/mapdata/log_file.log" it is saved with ownership to
> > www-data for both user and group. Well this seems to cause problem for
> > Python mapscript (at least at my machine with Python version 2.7 -
> > Python 3 is not able to import mapscript at all). I'm using Spyder as
> > an environment and it gives me the following message
> >
> > MapServerError: msSetErrorFile(): General error message. Failed to open
> > MS_ERRORFILE /home/stefanos/mapdata/log_file.log
> >
> > mapserv -v
> >
> > MapServer version 7.0.1 OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML SUPPORTS=PROJ
> > SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=ICONV
> > SUPPORTS=XMP SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT
> > SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER
> > SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS
> > INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE
> >
> > Is there any way to solve this issue ?
>
>
> Create the file before you use and make if group writable and group
> owned by www-data
>
> sudo rm /home/stefanos/mapdata/log_file.log
> touch /home/stefanos/mapdata/log_file.log
> chmod 664 /home/stefanos/mapdata/log_file.log
> sudo chgrp www-data /home/stefanos/mapdata/log_file.log
>
> -Steve W
>
> ---
> This email has been checked for viruses by Avast antivirus software.
> https://www.avast.com/antivirus
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org <mailto:mapserver-users at lists.osgeo.org>
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
More information about the MapServer-users
mailing list