[MapServer-users] "msLoadMap(): Unable to access file..." for Mapserver 8.4.0

Guldberg, Erik Erik.Guldberg at ra.no
Thu Feb 27 04:11:22 PST 2025


I'm trying to set up a testing environment for Mapserver 8.4.0 in WSL/Ubuntu, but I keep getting the error: msLoadMap(): Unable to access file. (/home/erik/maps/kulturminner/kulturminner.map)

As far as I know, my setup is mostly the same as for my "real" server where I run 7.6.4.

I have a mapserver.conf-file with a MS_MAP_PATTERN, and that works fine.

Files and folders permissions:
Folders: drwxr-xr-x (chmod 755)
Files:  -rw-r--r-- (chmod 644)

The owner is www-data, but I've also tried a regular user, which is what I use for the server where I run 7.6.4.

My Apache-setup looks like this:
<VirtualHost *:80>
    SetEnv MAPSERVER_CONFIG_FILE /usr/local/etc/mapserver.conf
    ServerAdmin webmaster at localhost
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    RewriteEngine On
    RewriteRule ^/wms/(.*) /cgi-bin/mapserv.fcgi?map=/home/erik/maps/$1/$1.map [PT,QSA]
    <Directory "/usr/lib/cgi-bin/">
        AllowOverride None
        Options +ExecCGI -MultiViews +FollowSymLinks
        AddHandler fcgid-script .fcgi
        Require all granted
    </Directory>
    Header set Access-Control-Allow-Origin "*"
</VirtualHost>

URLs
Both URLs gives the same error
http://localhost/cgi-bin/mapserv?map=/home/erik/maps/kulturminner/kulturminner.map
http://localhost/wms/kulturminner





Appreciate any help


Erik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20250227/2e0167b8/attachment.htm>


More information about the MapServer-users mailing list