[Live-demo] grass data outside the home directory

Hamish hamish_b at yahoo.com
Wed Dec 17 00:15:57 EST 2008


Stefan Hansen wrote:
> While working on the next release of our LiveDVD, I ran
> into a problem with grass.
> 
> Since I wanted to get rid of all spatial data in the users
> home directory (having lots of stuff there just increases
> the memory requirements), I moved my datagrass folder (which
> contains the demo data) to /usr/local/share/. Since the
> standard user "ubuntu" is created on the fly and
> therefore can't be the owner of files that exist before
> his creation (at least that how I interpreted that on the
> LiveDVD all files owned by "ubuntu", had changed
> the owner to something weird), I changed the owner of this
> folder, subfolders and files to "root", but gave
> all users access and write rights.
> 
> Unfortunately grass doesn't like that. It only wants to
> access the data, if the owner is the user who runs grass
> (e.g. "sudo grass" works fine).
> 
> For now I moved datagrass back home, but now our memory
> requirements are up to 1gig, which is not really acceptable.
> 
> Does anyone have an idea how to solve this problem?


Hi,

as you've found, in grass the user must be the owner of the current mapset.
write permissions are not enough.

you can read other mapsets in the same location owned by other users, but
not write to them (even with filesystem permissions. it was designed to be
used by a collaborating team, with out anyone clobbering anyone else's
work. see the help pages for the g.access and g.mapsets (with an "s") modules.
  http://grass.osgeo.org/grass64/manuals/html64_user/general.html


even if the ubuntu user is created on the fly each time, does the UID change or stay constant? maybe you could set the owner of the file to the
number not the name..?


or recompile GRASS bypassing the owner check; this is already done for
the MS-Windows build. see G__mapset_permissions() in lib/gis/mapset_msc.c
  http://trac.osgeo.org/grass/browser/grass/trunk/lib/gis/mapset_msc.c#L94
shouldn't be an issue from a liveCD as inherently a single user system.
(one would hope)



there are number of posts in the grass mailing list archives explaining
how to get around it.
  http://search.gmane.org/?query=mapset+permission&author=glynn&group=gmane.comp.gis.grass.devel&sort=date&DEFAULTOP=and&xP=Zmapset%09Zpermiss&xFILTERS=Gcomp.gis.grass.devel---A


good luck,
Hamish



      



More information about the Live-demo mailing list