Opened 22 months ago

Last modified 11 months ago

#3559 new defect

permission denied on Windows Subsystem for Linux

Reported by: lrntct Owned by: grass-dev@…
Priority: normal Milestone: 7.6.2
Component: Default Version: 7.4.0
Keywords: Cc:
CPU: x86-64 Platform: Unspecified

Description

I am trying to use GRASS on Ubuntu 18.04 on Windows 10 using the Windows Subsystem for Linux.

The permissions seems to work appropriately, i.e I can create a normal file, either manually or through Python. The error occurs only when using GRASS, that is why I report the bug here. When I try to create a map, GRASS returns the following error:

Writing a file works
Creating a GRASS map results in a permission denied error
ERROR: MAPSET input - permission denied
Traceback (most recent call last):
  File "../../../../Documents/grass_wsl.py", line 9, in <module>
    gscript.run_command('r.mapcalc', expression="map_test=2")
  File "/usr/lib/grass74/etc/python/grass/script/core.py", line 421, in run_command
    return handle_errors(returncode, returncode, args, kwargs)
  File "/usr/lib/grass74/etc/python/grass/script/core.py", line 332, in handle_errors
    returncode=returncode)
grass.exceptions.CalledModuleError: Module run None ['r.mapcalc', 'expression=map_test=2'] ended with error
Process ended with non-zero return code 1. See errors in the (error) output.

This is a minimum working example:

print('Writing a file works')
with open('testfile', 'w') as testfile:
    testfile.write('this is a test')

print('Creating a GRASS map results in a permission denied error')
from grass.script import core as gscript
gscript.run_command('r.mapcalc', expression="map_test=2")

Change History (3)

comment:1 Changed 18 months ago by neteler

Is this necessarily a GRASS GIS error?

Some help may be here:

https://docs.microsoft.com/en-us/windows/wsl/user-support#permissions

comment:2 Changed 13 months ago by martinl

Milestone: 7.6.07.6.1

Ticket retargeted after milestone closed

comment:3 Changed 11 months ago by martinl

Milestone: 7.6.17.6.2

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.