[GRASS5] Re: Multiuser grass projects
Martin Pokorny
martin at truffulatree.org
Sun Jun 29 18:28:36 EDT 2003
On Fri, 27 Jun 2003, Glynn Clements wrote:
> John Harrop wrote:
>
>> What are other people doing with projects/jobs that require
>> multiple users to access grass files? It seems that data
>> permissions are enforced at the owner level which stops a group
>> from sharing project files.
>>
>> Is there a rational for this level of restriction?
>
> My guess is that it's an indirect form of locking. Each user can
> only have one session active at a time, each mapset directory can
> only be modified by its owner, therefore you can't have multiple
> sessions modifying the same mapset concurrently.
>
> Two issues mean that this mechanism isn't particularly reliable:
>
> 1. The one-session-at-a-time rule can be circumvented just by
> changing the value of HOME (the lock file is $HOME/.gislock5).
>
> 2. Nothing prevents a user from running programs in the background.
>
> However, it does prevent users from accidentally shooting each other
> in the foot.
>
>> Is there a work-around I'm missing?
I recently investigated this topic with GRASS by implementing POSIX
file locking. This was relatively easy to do because I was able to
insert most of the requisite code into the GRASS GIS library "open
file" functions, and did not have to worry about closing files because
the POSIX file locks are automatically freed when a file is closed.
Depending on the version of NFS you use, such a solution might be
usable on NFS-mounted directories (or not). I have not experimented
with my modifications enough to ensure their reliability and
robustness, however. With such a solution, proper group permissions
will allow file sharing in GRASS mapsets.
Cheers,
Martin
--
Martin Pokorny
Tucson, AZ, USA
More information about the grass-dev
mailing list