[GRASS-windows] Problems with accessing location between windows and linux

7 messages Options
Embed this post
Permalink
Martin Maier-2

[GRASS-windows] Problems with accessing location between windows and linux

Reply Threaded More More options
Print post
Permalink
Hello,

I am using a dual boot system with Windows XP and OpenSuse. I have
created some locations and mapsets using GRASS Windows (with the native
windows installer, 6.3.0-4), on a FAT32 disk. When I now try to access
these locations out of the OpenSuse System (navigating to the database),
I can see the created locations, but if I chose a location I get no
mapsets. So I can not access any data created with the windows version
of GRASS.
Is there any difference in creating files between the windows and the
linux versions of GRASS or is a problem with accessing the FAT32
file-system with the Linux-GRASS?
Any hint would be great.
_______________________________________________
grass-windows mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-windows
Moritz Lennert

Re: [GRASS-windows] Problems with accessing location between windows and linux

Reply Threaded More More options
Print post
Permalink
On 10/10/08 11:46, Martin Maier wrote:

> Hello,
>
> I am using a dual boot system with Windows XP and OpenSuse. I have
> created some locations and mapsets using GRASS Windows (with the native
> windows installer, 6.3.0-4), on a FAT32 disk. When I now try to access
> these locations out of the OpenSuse System (navigating to the database),
> I can see the created locations, but if I chose a location I get no
> mapsets. So I can not access any data created with the windows version
> of GRASS.
> Is there any difference in creating files between the windows and the
> linux versions of GRASS or is a problem with accessing the FAT32
> file-system with the Linux-GRASS?
> Any hint would be great.

Probably an issue with permissions. How do you mount the windows partition ?

You might be able to create a mapset in SUSE and then use g.mapsets (in
gis.m: Config->GRASS working environment->Mapset access) to give
yourself read access to the other mapsets.

Moritz
_______________________________________________
grass-windows mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-windows
Martin Maier-2

Re: [GRASS-windows] Problems with accessing location between windows and linux

Reply Threaded More More options
Print post
Permalink
Moritz Lennert schrieb am 10.10.2008 15:10:

> On 10/10/08 11:46, Martin Maier wrote:
>> Hello,
>>
>> I am using a dual boot system with Windows XP and OpenSuse. I have
>> created some locations and mapsets using GRASS Windows (with the native
>> windows installer, 6.3.0-4), on a FAT32 disk. When I now try to access
>> these locations out of the OpenSuse System (navigating to the database),
>> I can see the created locations, but if I chose a location I get no
>> mapsets. So I can not access any data created with the windows version
>> of GRASS.
>> Is there any difference in creating files between the windows and the
>> linux versions of GRASS or is a problem with accessing the FAT32
>> file-system with the Linux-GRASS?
>> Any hint would be great.
>
> Probably an issue with permissions. How do you mount the windows
> partition ?
>
> You might be able to create a mapset in SUSE and then use g.mapsets
> (in gis.m: Config->GRASS working environment->Mapset access) to give
> yourself read access to the other mapsets.
>
> Moritz
Hello Moritz,

thank you for the tip.
I mount with the following line in fstab:
/dev/sda3            /media/daten         vfat      
users,gid=users,umask=0002,utf8=true,quiet 0 0
So I have read and write permission to the directory (I am member of the
group 'users').

But it is indeed a problem of permission, but I don't know what's the
problem:
If I start GRASS in text-mode within OpenSuse, I can create a new mapset
(e.g. mapset1) within the location 'loc1' which I have created within
Windows and mounted as described. GRASS saves a new folder 'mapset1' in
the folder 'loc1'. Within the folder 'mapset1' there are two files: var
and wind and a folder named dbf.
After that a error message appears:

Sorry, no access to <<mapset1>>.

Mapsets in location <loc1>
----------------------
   PERMANENT              test.grc              mapset1

note: you do not have access to any of these mapsets

Then GRASS closes down. But GRASS has just created the mapset1 folder,
so I should have write permission, or not?
_______________________________________________
grass-windows mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-windows
Moritz Lennert

Re: [GRASS-windows] Problems with accessing location between windows and linux

Reply Threaded More More options
Print post
Permalink
On 10/10/08 15:57, Martin Maier wrote:

> Moritz Lennert schrieb am 10.10.2008 15:10:
>> On 10/10/08 11:46, Martin Maier wrote:
>>> Hello,
>>>
>>> I am using a dual boot system with Windows XP and OpenSuse. I have
>>> created some locations and mapsets using GRASS Windows (with the native
>>> windows installer, 6.3.0-4), on a FAT32 disk. When I now try to access
>>> these locations out of the OpenSuse System (navigating to the database),
>>> I can see the created locations, but if I chose a location I get no
>>> mapsets. So I can not access any data created with the windows version
>>> of GRASS.
>>> Is there any difference in creating files between the windows and the
>>> linux versions of GRASS or is a problem with accessing the FAT32
>>> file-system with the Linux-GRASS?
>>> Any hint would be great.
>> Probably an issue with permissions. How do you mount the windows
>> partition ?
>>
>> You might be able to create a mapset in SUSE and then use g.mapsets
>> (in gis.m: Config->GRASS working environment->Mapset access) to give
>> yourself read access to the other mapsets.
>>
>> Moritz
> Hello Moritz,
>
> thank you for the tip.
> I mount with the following line in fstab:
> /dev/sda3            /media/daten         vfat      
> users,gid=users,umask=0002,utf8=true,quiet 0 0
> So I have read and write permission to the directory (I am member of the
> group 'users').
>
> But it is indeed a problem of permission, but I don't know what's the
> problem:
> If I start GRASS in text-mode within OpenSuse, I can create a new mapset
> (e.g. mapset1) within the location 'loc1' which I have created within
> Windows and mounted as described. GRASS saves a new folder 'mapset1' in
> the folder 'loc1'. Within the folder 'mapset1' there are two files: var
> and wind and a folder named dbf.
> After that a error message appears:
>
> Sorry, no access to <<mapset1>>.
>
> Mapsets in location <loc1>
> ----------------------
>    PERMANENT              test.grc              mapset1
>
> note: you do not have access to any of these mapsets
>
> Then GRASS closes down. But GRASS has just created the mapset1 folder,
> so I should have write permission, or not?

AFAIK, group permissions are not enough, you need to be the _owner_ of
the directory and files. Can you chown the files in the windows
partition ? Maybe you need to play around with the umask setting.

There might also be other problems such as case. Check out the following
threads:

http://thread.gmane.org/gmane.comp.gis.grass.user/23652/
http://thread.gmane.org/gmane.comp.gis.grass.devel/8822/focus=8844

Moritz
_______________________________________________
grass-windows mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-windows
Isaac Ullah

Re: [GRASS-windows] Problems with accessing location between windows and linux

Reply Threaded More More options
Print post
Permalink
In reply to this post by Martin Maier-2

You might try using "g.access" in WinGRASS, giving permission for "others" to access the mapset. I also run a dual boot (Kubuntu/Windows), as well as run back and forth between various Linux, Mac, and Windows machines with the same mapsets, and sometimes run into these kind of permission problems. If it is not solved with the g.access trick, you should try starting grass as superuser (su in the console), and see if you still hit permission issues...

Cheers,

Isaac


Message: 4
Date: Fri, 10 Oct 2008 17:12:22 +0200
From: Moritz Lennert <[hidden email]>
Subject: Re: [GRASS-windows] Problems with accessing location between
       windows and linux
To: Martin Maier <[hidden email]>
Cc: [hidden email]
Message-ID: <[hidden email]>
Content-Type: text/plain; charset=ISO-8859-15; format=flowed

On 10/10/08 15:57, Martin Maier wrote:
> Moritz Lennert schrieb am 10.10.2008 15:10:
>> On 10/10/08 11:46, Martin Maier wrote:
>>> Hello,
>>>
>>> I am using a dual boot system with Windows XP and OpenSuse. I have
>>> created some locations and mapsets using GRASS Windows (with the native
>>> windows installer, 6.3.0-4), on a FAT32 disk. When I now try to access
>>> these locations out of the OpenSuse System (navigating to the database),
>>> I can see the created locations, but if I chose a location I get no
>>> mapsets. So I can not access any data created with the windows version
>>> of GRASS.
>>> Is there any difference in creating files between the windows and the
>>> linux versions of GRASS or is a problem with accessing the FAT32
>>> file-system with the Linux-GRASS?
>>> Any hint would be great.
>> Probably an issue with permissions. How do you mount the windows
>> partition ?
>>
>> You might be able to create a mapset in SUSE and then use g.mapsets
>> (in gis.m: Config->GRASS working environment->Mapset access) to give
>> yourself read access to the other mapsets.
>>
>> Moritz
> Hello Moritz,
>
> thank you for the tip.
> I mount with the following line in fstab:
> /dev/sda3            /media/daten         vfat
> users,gid=users,umask=0002,utf8=true,quiet 0 0
> So I have read and write permission to the directory (I am member of the
> group 'users').
>
> But it is indeed a problem of permission, but I don't know what's the
> problem:
> If I start GRASS in text-mode within OpenSuse, I can create a new mapset
> (e.g. mapset1) within the location 'loc1' which I have created within
> Windows and mounted as described. GRASS saves a new folder 'mapset1' in
> the folder 'loc1'. Within the folder 'mapset1' there are two files: var
> and wind and a folder named dbf.
> After that a error message appears:
>
> Sorry, no access to <<mapset1>>.
>
> Mapsets in location <loc1>
> ----------------------
>    PERMANENT              test.grc              mapset1
>
> note: you do not have access to any of these mapsets
>
> Then GRASS closes down. But GRASS has just created the mapset1 folder,
> so I should have write permission, or not?

AFAIK, group permissions are not enough, you need to be the _owner_ of
the directory and files. Can you chown the files in the windows
partition ? Maybe you need to play around with the umask setting.

There might also be other problems such as case. Check out the following
threads:

http://thread.gmane.org/gmane.comp.gis.grass.user/23652/
http://thread.gmane.org/gmane.comp.gis.grass.devel/8822/focus=8844

Moritz


------------------------------

_______________________________________________
grass-windows mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-windows


End of grass-windows Digest, Vol 26, Issue 11
*********************************************



--

Isaac I Ullah, M.A.

Archaeology PhD Student,
ASU School of Evolution and Social Change

Research Assistant,
Mediterranean Landscape Dynamics Project
***************************************************
[hidden email]
[hidden email]

http://www.public.asu.edu/~iullah
***************************************************

_______________________________________________
grass-windows mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-windows
Glynn Clements

Re: [GRASS-windows] Problems with accessing location between windows and linux

Reply Threaded More More options
Print post
Permalink
In reply to this post by Moritz Lennert

Moritz Lennert wrote:

> >>> I have
> >>> created some locations and mapsets using GRASS Windows (with the native
> >>> windows installer, 6.3.0-4), on a FAT32 disk.

> AFAIK, group permissions are not enough, you need to be the _owner_ of
> the directory and files. Can you chown the files in the windows
> partition ?

The FAT filesystem has neither permissions nor ownership.

[NTFS has these attributes, but the implementation is quite different
to Unix, so I'm not sure how well it maps. Also, writing to NTFS
partitions from Linux has always been considered risky, due to the
complexity of the format and the lack of documentation.]

When you mount FAT/VFAT filesystems on Linux, you can choose the owner
and permissions of the files with the following options:

       uid=value and gid=value
              Set the owner and group of all files.  (Default: the uid and gid
              of the current process.)

       umask=value
              Set  the umask  (the  bitmask  of  the permissions that are not
              present). The default is the umask of the current process.   The
              value is given in octal.

       dmask=value
              Set  the umask applied to directories only.  The default is the
              umask of the current process.  The value is given in octal.

       fmask=value
              Set the umask applied to regular files only.  The default is the
              umask of the current process.  The value is given in octal.

For GRASS, you will need to make yourself the owner. As Moritz points
out, write permission alone isn't enough.

There might be other problems, e.g. due to the fact that FAT doesn't
support hard links, which GRASS code occasionally uses.

Also, there could be issues due to filenames being case insensitive
(when GRASS tries to open a file directly, the case doesn't matter,
but if it scans the directory looking for a specific file, it may
overlook it if the case isn't what it expects). If that is a problem,
you can change how case is handled with the option:

       shortname=[lower|win95|winnt|mixed]

              Defines the behaviour for creation  and display of  filenames
              which fit into 8.3 characters. If a long name for a file exists,
              it will always be preferred display. There are four modes:

              lower  Force the short name to lower case upon display; store  a
                     long name when the short name is not all upper case.

              win95  Force  the short name to upper case upon display; store a
                     long name when the short name is not all upper case.

              winnt  Display the shortname as is; store a long name  when  the
                     short name is not all lower case or all upper case.

              mixed  Display  the short name as is; store a long name when the
                     short name is not all upper case.

We have had to iron out many such problems in the process of porting
GRASS to Windows. However, sometimes this has been achieved by adding
Windows-specific cases to the code, which won't have any effect if
you're actually running on Unix.

Finally, if you built GRASS from source, you can disable the ownership
checks by deleting the code within the "#ifndef __MINGW32__" blocks in
G__mapset_permissions() and G__mapset_permissions2() in the file
lib/gis/mapset_msc.c, then re-compiling.

Note to grass-dev: should we consider providing a mechanism to allow
the ownership check to be overridden? On a single-user system (or a
"shared" system where everyone has root/sudo access), the check isn't
critical, and can sometimes get in the way (like this).

--
Glynn Clements <[hidden email]>
_______________________________________________
grass-windows mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-windows
Martin Maier-2

Re: [GRASS-windows] Problems with accessing location between windows and linux

Reply Threaded More More options
Print post
Permalink
Glynn Clements wrote:

> Moritz Lennert wrote:
>
>  
>>>>> I have
>>>>> created some locations and mapsets using GRASS Windows (with the native
>>>>> windows installer, 6.3.0-4), on a FAT32 disk.
>>>>>          
>
>  
>> AFAIK, group permissions are not enough, you need to be the _owner_ of
>> the directory and files. Can you chown the files in the windows
>> partition ?
>>    
>
> The FAT filesystem has neither permissions nor ownership.
>
> [NTFS has these attributes, but the implementation is quite different
> to Unix, so I'm not sure how well it maps. Also, writing to NTFS
> partitions from Linux has always been considered risky, due to the
> complexity of the format and the lack of documentation.]
>
> When you mount FAT/VFAT filesystems on Linux, you can choose the owner
> and permissions of the files with the following options:
>
>        uid=value and gid=value
>      Set the owner and group of all files.  (Default: the uid and gid
>      of the current process.)
>
>        umask=value
>      Set  the umask  (the  bitmask  of  the permissions that are not
>      present). The default is the umask of the current process.   The
>      value is given in octal.
>
>        dmask=value
>      Set  the umask applied to directories only.  The default is the
>      umask of the current process.  The value is given in octal.
>
>        fmask=value
>      Set the umask applied to regular files only.  The default is the
>      umask of the current process.  The value is given in octal.
>
> For GRASS, you will need to make yourself the owner. As Moritz points
> out, write permission alone isn't enough.
>
> There might be other problems, e.g. due to the fact that FAT doesn't
> support hard links, which GRASS code occasionally uses.
>
> Also, there could be issues due to filenames being case insensitive
> (when GRASS tries to open a file directly, the case doesn't matter,
> but if it scans the directory looking for a specific file, it may
> overlook it if the case isn't what it expects). If that is a problem,
> you can change how case is handled with the option:
>
>        shortname=[lower|win95|winnt|mixed]
>
>      Defines the behaviour for creation  and display of  filenames
>      which fit into 8.3 characters. If a long name for a file exists,
>      it will always be preferred display. There are four modes:
>
>      lower  Force the short name to lower case upon display; store  a
>     long name when the short name is not all upper case.
>
>      win95  Force  the short name to upper case upon display; store a
>     long name when the short name is not all upper case.
>
>      winnt  Display the shortname as is; store a long name  when  the
>     short name is not all lower case or all upper case.
>
>      mixed  Display  the short name as is; store a long name when the
>     short name is not all upper case.
>
> We have had to iron out many such problems in the process of porting
> GRASS to Windows. However, sometimes this has been achieved by adding
> Windows-specific cases to the code, which won't have any effect if
> you're actually running on Unix.
>
> Finally, if you built GRASS from source, you can disable the ownership
> checks by deleting the code within the "#ifndef __MINGW32__" blocks in
> G__mapset_permissions() and G__mapset_permissions2() in the file
> lib/gis/mapset_msc.c, then re-compiling.
>
> Note to grass-dev: should we consider providing a mechanism to allow
> the ownership check to be overridden? On a single-user system (or a
> "shared" system where everyone has root/sudo access), the check isn't
> critical, and can sometimes get in the way (like this).
>
>  
Thanks a lot! I solved the problem with setting uid=my_user_name in the
fstab-file. Now everything is working. And no
problems with the case insensitivity till now. GRASS works with or
without the shortname=win95 mount option on my machine.

But I think on a multi-user system it is not possible to use the uid. So
it would be great to have a possibility to override the ownership check.

Thanks,
Martin


_______________________________________________
grass-windows mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-windows