[GRASSLIST:5697] Re: Sorry, no access to <<PERMANENT>>.
Glynn Clements
glynn.clements at virgin.net
Fri Feb 28 01:51:24 EST 2003
Matt Doggett wrote:
> .bout ready to pull my hair out on this one.
>
> Bottom line: Why does grass deny access to *everyone* except the owner
> of the PERMANENT mapset??
At the implementation level, the reason is:
/****************************************************************
* G__mapset_permissions (mapset)
*
* returns: 1 mapset exists, and user has permission
* 0 mapset exists, BUT user denied permission
* -1 mapset does not exist
****************************************************************/
int G__mapset_permissions (char *mapset)
{
char path[256];
struct stat info;
G__file_name (path,"","",mapset);
if (stat (path, &info) != 0)
return -1;
if (info.st_uid != getuid())
return 0;
if (info.st_uid != geteuid())
return 0;
return 1;
}
At a design level, the reason is ... well, your guess is as probably
as good as anyone else's. Whoever originally implemented this
presumably had their reasons, but I doubt that any of the current
developers would be able to justify it.
--
Glynn Clements <glynn.clements at virgin.net>
More information about the grass-user
mailing list