[GRASS-user] shared access to mapsets
Glynn Clements
glynn at gclements.plus.com
Thu Jan 18 21:11:40 EST 2007
Duncan Golicher wrote:
> After going through all the steps I was still locked out! I got the
> message that I am currently running GRASS in selected mapset, concurrent
> use not allowed.
That specific error means that there is a .gislock file in the mapset
directory. This file is supposed to be removed when you end the GRASS
session, but if the session is terminated abnormally (e.g. system
crash), the file can be left behind. In that case, you need to delete
the .gislock file manually.
You may also get the error if the $GISBASE/etc/lock program is
missing, or if it fails for some other reason. In that situation, you
could just remove the check from the Init.sh script.
> I then had some trouble resetting everything to get
> back in on the old machine. There must be a simpler solution! (?)
If you want to switch ownership regularly, giving both users the "take
ownership" permission should make it relatively painless to change
ownership. Most of the steps I listed should only be required the
first time.
There might be a way to persuade Cygwin to treat both accounts as
equivalent. Look in Cygwin's /etc/passwd file; if it has entries for
both usernames, using the same UID (third field) for both may solve
the problem (GRASS compares the st_uid field returned from stat() with
the result of getuid() and geteuid()). Also, the presence or "ntsec"
or "nontsec" in the value of the CYGWIN environment variable may have
an effect.
> Note that the idea of making new locations is fine, but I have the
> data on an external hard drive that I just want to move between two
> PCs. Any further suggestions would be very welcome.
If you are willing to compile GRASS yourself from source code, you can
just delete the relevant lines from G__mapset_permissions() and
G__mapset_permissions2() (at the bottom of lib/gis/mapset_msc.c).
Alternatively, you can just use two mapsets, one for each username.
You can use g.mapsets to add additional mapsets to the search path,
which will allow you to access files from either mapset by name
(without having to use the map at mapset syntax).
That isn't ideal, as you won't be able to use g.remove, g.rename or
g.copy on maps which aren't in the current mapset. Also, if you try to
"replace" a map which is in the "other" mapset by creating a new map
with the same name, it will work in the sense that the new map will
"mask" the old one, but if you switch PCs (and mapsets) then the old
map will mask the new one.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-user
mailing list