[GRASS-user] Read only mapsets

Hello everyone,

I was wondering, is there a way to enforce a Mapset to be read-only? I guess that this can always be enforced on the Filesystem level with something like this:

find . -type f -exec chmod a-w {} ;

but then again some file might need to be writable afterall (sqlite.db?)

So is there a way to e.g. open specific maps in read-only mode?

all the best,
Panos

You could use the PERMANENT mapset for this purpose. Also, the AFAIK mapsets are writable by the directory owner. So you could use the filesystem setting to achieve what you want to do.

There is a more detailed explanation here
https://grasswiki.osgeo.org/wiki/Location_and_Mapsets

Cheers

On Fri, Apr 26, 2019 at 6:53 AM Panagiotis Mavrogiorgos <pmav99@gmail.com> wrote:

Hello everyone,

I was wondering, is there a way to enforce a Mapset to be read-only? I guess that this can always be enforced on the Filesystem level with something like this:

find . -type f -exec chmod a-w {} ;

but then again some file might need to be writable afterall (sqlite.db?)

So is there a way to e.g. open specific maps in read-only mode?

all the best,
Panos


grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

On Fri, Apr 26, 2019 at 2:24 PM Daniel Victoria <daniel.victoria@gmail.com> wrote:

You could use the PERMANENT mapset for this purpose. Also, the AFAIK mapsets are writable by the directory owner. So you could use the filesystem setting to achieve what you want to do.

There is a more detailed explanation here
https://grasswiki.osgeo.org/wiki/Location_and_Mapsets

Cheers

Thank you,

Nevertheless, as far as I can tell, the PERMANENT mapset is “readonly” just by convention. There are no guarantees, that the map will not be changed during the session.

P.

On 26/04/19 11:53, Panagiotis Mavrogiorgos wrote:

Hello everyone,

I was wondering, is there a way to enforce a Mapset to be read-only? I guess that this can always be enforced on the Filesystem level with something like this:

    find . -type f -exec chmod a-w {} \;

but then again some file might need to be writable afterall (sqlite.db?)

So is there a way to e.g. open specific maps in read-only mode?

Normally, you can only write in a mapset if you are the owner of that mapset, so you could create a mapset owned by a "readonly" user/group.

Moritz

On Fri, Apr 26, 2019 at 3:59 PM Moritz Lennert <mlennert@club.worldonline.be> wrote:

On 26/04/19 11:53, Panagiotis Mavrogiorgos wrote:

Hello everyone,

I was wondering, is there a way to enforce a Mapset to be read-only? I
guess that this can always be enforced on the Filesystem level with
something like this:

find . -type f -exec chmod a-w {} ;

but then again some file might need to be writable afterall (sqlite.db?)

So is there a way to e.g. open specific maps in read-only mode?

Normally, you can only write in a mapset if you are the owner of that
mapset, so you could create a mapset owned by a “readonly” user/group.

Moreover, within a GRASS session, i.e. with GRASS tools, all mapsets but the current mapset are readonly, that is, you can read data from other mapsets but not modify them, even if the current user is also the owner of other mapsets.

Markus M

Moritz


grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user