Skip to content

MapServer fixes to allow Mapfiles in /home/user #400

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app-conf/mapserver/mapserver.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
CONFIG
ENV
MS_MAP_PATTERN "^\/usr\/local\/((\.\/)?|([^\.][-_A-Za-z0-9\.]*\/{1}))*([-_A-Za-z0-9\.]+\.(map))$"
# allow Mapfiles from any location but they must end with .map
MS_MAP_PATTERN ".*/.*\.map$"
MS_MAP_BAD_PATTERN "[/\\]{2}|[/\\]?\.{2,}[/\\]|,"
OGCAPI_HTML_TEMPLATE_DIRECTORY "/usr/share/mapserver/ogcapi/templates/html-plain/"
END
Expand Down
4 changes: 3 additions & 1 deletion bin/install_mapserver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ MS_DEMO_VERSION="1.2"
MS_DOCS_VERSION="8-2"

wget -c --progress=dot:mega \
"http://download.osgeo.org/livedvd/data/mapserver/mapserver-$MS_DOCS_VERSION-html-docs.zip"
"https://download.osgeo.org/livedvd/data/mapserver/mapserver-$MS_DOCS_VERSION-html-docs.zip"
wget -c --progress=dot:mega \
"https://github.com/mapserver/mapserver-demo/archive/v$MS_DEMO_VERSION.zip"

Expand Down Expand Up @@ -146,6 +146,8 @@ EOF
cp /usr/share/applications/mapserver.desktop "$USER_HOME/Desktop/"
chown "$USER_NAME:$USER_NAME" "$USER_HOME/Desktop/mapserver.desktop"

# allow Mapfiles to be read from /home/user
chmod o+rx "$USER_HOME"

# share data with the rest of the disc
ln -s /usr/local/share/mapserver/demos/itasca/data \
Expand Down