Skip to content
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

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

Merged
merged 1 commit into from
Oct 18, 2024

Conversation

geographika
Copy link
Contributor

This pull request includes the following changes:

  • allows Mapfiles to be loaded from any location. As discussed in MapServer QuickStart Updates OSGeoLive-doc#869 - the quickstart asks uses to save files in the /home/user directory. The current MS_MAP_PATTERN only allowed for Mapfiles in /usr/local.
  • Grants execute permissions on the /home/user directory (execute in this case means the user can read the contents, not execute scripts). Without this MapServer can't read the file and returns msLoadMap(): Unable to access file. (/home/user/mapserver_quickstart.map).
  • Switches the docs download to HTTPS

@kalxas kalxas merged commit a63f1ca into OSGeo:master Oct 18, 2024
@geographika
Copy link
Contributor Author

This update does not appear to fix the permissions in the latest osgeolive-17.0alpha3-amd64.iso which still returns msLoadMap(): Unable to access file. (/home/user/mapserver_quickstart.map)

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

However, when logged into the VM and manually running:

sudo chmod o+rx /home/user

I can access http://localhost/cgi-bin/mapserv?map=/home/user/mapserver_quickstart.map&SERVICE=WMS&REQUEST=Getmap&VERSION=1.1.1&LAYERS=Countries&STYLES=&SRS=EPSG:4326&BBOX=-137,29,-53,88&FORMAT=PNG&WIDTH=800&HEIGHT=600 without problems.

Logged permissions:

# prior to manually running command
ls -l /home
drwxr-x--- 19 user user user/

# manually run permissions
sudo chmod o+rx /home/user
drwxr-xr-- 19 user user user/ 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants