5

I'm trying to automate the process of pushing from a server to Github as a way of tracking Geoserver changes, and pulling from Github as a way of deploying new work. The push side works fine, but if I create a new layer in Geoserver, and then try to edit that elsewhere and pull changes back to the server it fails.

Steps:

  1. Publish new layer in geoserver
  2. Push that from the server, pull it to my own machine
  3. Make any changes - e.g. adding height.ftl or description.ftl
  4. Push that from my machine, try to pull it back on the server.

At this point, I get a "permission denied" error, and the issue seems to be that Geoserver isn't giving these directories group write permissions; specifically it's setting: drwxr-xr-x

A manual chmod g+w fixes this, but I'm trying to get the process more automated. Is there a way to set the permissions with which Geoserver creates these directories?

[adding with later edit: it occurred to me to check the umask settings, and that seems to be set to 0002 for all of my user account, the user Geoserver runs as, and the user Github runs as. They're also all members of each others' groups. If I've understood this correctly, it means the server's default behaviour is to give group write permission to new directories and files, so Geoserver must be explicitly withholding that permission.]

3

GeoServer does not do anything to control the permissions of the directories, so it gets the default permissions the OS would assign. I believe you have to change the umask for the user that's running the GeoServer process: http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html

  • Thanks, but as I said at the end of the question, I did check the umask. The account that runs tomcat7 (which in turn runs Geoserver) has a umask of 0002. Unless I'm misunderstanding umask terribly, that means that files & folders should be created with group write permissions but not all write. I then created a new layer, and sure enough its directory has no group write permission: it's drwxr-xr-x – Eldan Goldenberg Oct 14 '14 at 18:03
  • Looks like you were on the right track, though, in that it's a Linux config issue rather than a strictly Geoserver one. Here's a relevant thread from Stack Overflow: stackoverflow.com/questions/1918524/… – Eldan Goldenberg Oct 15 '14 at 1:18
  • Moderators: should we close this question or mark it as answered elsewhere? I'd rather not delete it in case someone else searches for this - at least they'll find some breadcrumbs. – Eldan Goldenberg Oct 15 '14 at 1:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.