[MapServer-users] MS_MAP_PATTERN cannot accept network share
Steve Lime
sdlime at gmail.com
Fri Mar 24 06:52:50 PDT 2023
Hi Benedek: You'll need to fiddle with MS_MAP_BAD_PATTERN. Looking at the
sample configuration file it's value is:
MS_MAP_BAD_PATTERN "[/\\]{2}|[/\\]?\\.+[/\\]|,"
If a mapfile path matches any of those, it's rejected. By default it's
blocking anything with \\, //, back references or commas anywhere in the
path. This makes it easier to write clear MS_MAP_PATTERN values. Anway, you
can override that value in the config file to remove blocking the //. Then
you'd want to make sure your MS_MAP_PATTERN starts with something like:
MS_MAP_PATTERN "^//MY-NAS/MapFiles"
and be sure to test your patterns. Let us know how it goes.
--Steve
On Thu, Mar 23, 2023 at 3:48 PM Benedek Petrovicz <
benedek.petrovicz at gmail.com> wrote:
> Hi!
>
> I'm running into an issue where I cannot reference the mapfiles from a
> network share.
> I'm getting the following error: *msCGILoadMap(): Web application error.
> CGI variable "map" fails to validate.*
>
> The path to my mapfile is the following: *//MY-NAS/MapFiles/test.map*
> It's under a network share.
>
> I know that it should work, because when I set a MAP alias to the same
> path in the global config, it just works.
>
> I tried multiple MS_MAP_PATTERN settings, but couldn't get it to accept
> the path.
>
> - *MS_MAP_PATTERN "."*
> - *MS_MAP_PATTERN "^.+$"*
>
> Is there any way to get MapServer accept a network share path?
> Unfortunately I cannot use the MAP aliases, because I have to make it work
> for multiple dynamic environments.
>
> I'm trying to make it work under MapServer 8.
>
> Thank you!
> Benedek
> _______________________________________________
> MapServer-users mailing list
> MapServer-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20230324/b3071c65/attachment.htm>
More information about the MapServer-users
mailing list