Opened 11 years ago
Closed 10 years ago
#2290 closed defect (fixed)
Wrong file permissions for grassXY.py on Windows (was: Grass not starting)
Reported by: | dnewcomb | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 7.0.0 |
Component: | Installation | Version: | svn-releasebranch70 |
Keywords: | installation | Cc: | |
CPU: | x86-64 | Platform: | MSWindows 7 |
Description
When trying to launch GRASS 7 svnR60210-961, i only get hte command window minimized. When bringing up the window I see: C:\Program Files (x86)\GRASS GIS 7.0.0svn\extrabin\python.exe: can't open file ' C:\Program Files (x86)\GRASS GIS 7.0.0svn\etc\grass70.py': [Errno 13] Permission denied Press any key to continue . . .
Upon pressing any key the command window disappears and GRASS is not running.
Attachments (1)
Change History (22)
by , 11 years ago
Attachment: | grass7_error.png added |
---|
comment:1 by , 11 years ago
Could you try to start GRASS from the OSGeo4W command line:
cd C:\Program Files (x86)\GRASS GIS 7.0.0svn\etc\ grass70.py -text
?
comment:2 by , 11 years ago
Tried that and I get Access is denied.
Looking at the security permissions for grass70.py , I see that there are only security permissions listed for administrative users ( i.e. SYSTEM, Administrators Group) There are no security policies for ordinary users listed . Comparing to other programs, it looks like there should be read and read and execute permissions for standard Users.
follow-up: 4 comment:3 by , 11 years ago
Downloaded r60231-962 , and had same problem. Manually set grass70.py Windows security settings to Add USERS read and read/execute rights and GRASS 7.0 started normally. The fix appears to be setting the correct security settings for USERS for this file upon install.
comment:4 by , 11 years ago
Replying to dnewcomb:
Downloaded r60231-962 , and had same problem. Manually set grass70.py Windows security settings to Add USERS read and read/execute rights and GRASS 7.0 started normally. The fix appears to be setting the correct security settings for USERS for this file upon install.
are you installing winGRASS7-standalone installer with admin rights (e.g. right click on the standalone installer and execute as admin)?
long time ago I've added this as a needed default to the standalone installer: http://trac.osgeo.org/grass/browser/grass/trunk/mswindows/GRASS-Installer.nsi.tmpl#L96
comment:5 by , 11 years ago
| are you installing winGRASS7-standalone installer with admin rights (e.g. right |click on the standalone installer and execute as admin)?
|long time ago I've added this as a needed default to the standalone installer: |http://trac.osgeo.org/grass/browser/grass/trunk/mswindows/GRASS-Installer.nsi.tmpl#L96
I just tried that and I still have the same problem
follow-up: 7 comment:6 by , 10 years ago
Component: | Default → Installation |
---|---|
Priority: | normal → critical |
I installed Wingrass 7.0 nightly on Vista launching the installer with "Run as Admin", still on the ordinary user account I got hit by this bug. (For a strange reason the grass70.py file was lacking permissions for Users account.)
Rising its priority as ordinary user might not have Admin rights and thus installer should create a working installation at the first place not requiring manual adjustment of file permissions later.
follow-up: 8 comment:7 by , 10 years ago
Type: | defect → enhancement |
---|
Replying to marisn:
I installed Wingrass 7.0 nightly on Vista launching the installer with "Run as Admin", still on the ordinary user account I got hit by this bug.
I wouldn't say that this is a winGRASS bug, it's a window operating system and a sytem right issue that can't be solved easily; as there are quite a lot of different right managements out there in the windows world. so I would class it rather an enhancement than a defect.
follow-up: 9 comment:8 by , 10 years ago
Summary: | Grass not starting → Wrong file permissions for grassXY.py on Windows (was: Grass not starting) |
---|---|
Type: | enhancement → defect |
Replying to hellik:
I wouldn't say that this is a winGRASS bug, it's a window operating system and a sytem right issue that can't be solved easily; as there are quite a lot of different right managements out there in the windows world. so I would class it rather an enhancement than a defect.
It is. In *NIX world that equals shipping a package (RPM, deb) with missing go+R permissions. This is not a limitation of Windows. This is an error in Wingrass installer not setting correct permissions on files. Changed the summary to better reflect the scope of this issue.
I am not familiar with NSIS and Wingrass, but as grass70.py file was affected, I would look on some of the magic touching that particular file, i.e.: https://trac.osgeo.org/grass/browser/grass/trunk/mswindows/GRASS-Installer.nsi.tmpl#L884
comment:9 by , 10 years ago
Replying to marisn:
Replying to hellik:
I wouldn't say that this is a winGRASS bug, it's a window operating system and a sytem right issue that can't be solved easily; as there are quite a lot of different right managements out there in the windows world. so I would class it rather an enhancement than a defect.
It is. In *NIX world that equals shipping a package (RPM, deb) with missing go+R permissions. This is not a limitation of Windows. This is an error in Wingrass installer not setting correct permissions on files. Changed the summary to better reflect the scope of this issue.
I am not familiar with NSIS and Wingrass, but as grass70.py file was affected, I would look on some of the magic touching that particular file, i.e.: https://trac.osgeo.org/grass/browser/grass/trunk/mswindows/GRASS-Installer.nsi.tmpl#L884
it could be that changing some content in the file by L884 etc. may change the permission rights on some windows systems.
for setting permission rights:
follow-up: 11 comment:10 by , 10 years ago
Keywords: | installation added |
---|
Possible duplicate of #1983. Please continue discussion here.
follow-ups: 12 13 comment:11 by , 10 years ago
Replying to wenzeslaus:
Possible duplicate of #1983. Please continue discussion here.
around line L894 may be following should be added:
AccessControl::SetOnFile "$INSTDIR\etc\grass@GRASS_VERSION_MAJOR@@GRASS_VERSION_MINOR@.py" "(BU)" "Execute"
not sure to whom execute should be granted ( BU is builtin/users: builtin/users
follow-up: 14 comment:12 by , 10 years ago
Replying to hellik:
Replying to wenzeslaus:
Possible duplicate of #1983. Please continue discussion here.
around line L894 may be following should be added:
and the plugin has to be added to nsis on the build server.
follow-up: 15 comment:13 by , 10 years ago
comment:14 by , 10 years ago
Replying to hellik:
and the plugin has to be added to nsis on the build server.
done and documented on wiki:CompileOnWindows
follow-up: 16 comment:15 by , 10 years ago
Replying to martinl:
Replying to hellik:
around line L894 may be following should be added:
> AccessControl::SetOnFile "$INSTDIR\etc\grass@GRASS_VERSION_MAJOR@@GRASS_VERSION_MINOR@.py" "(BU)" "Execute"done in r61401. Please check the next build 2014-07-26.
tested with
http://wingrass.fsv.cvut.cz/grass71/WinGRASS-7.1.svn-r61439-1037-Setup.exe
GRASS Version: 7.1.svn GRASS SVN Revision: 61439 Erstellungsdatum: 2014-07-29 Build Platform: i686-pc-mingw32 GDAL/OGR: 1.11.0 PROJ.4: 4.8.0 GEOS: 3.4.2 SQLite: 3.7.17 Python: 2.7.4 wxPython: 2.8.12.1 Platform: Windows-Vista-6.0.6002-SP2
there is now added following access control to the current user:
grass71.py user: read, execute => allowed read => allowed
follow-up: 17 comment:16 by , 10 years ago
Replying to hellik:
tested with
http://wingrass.fsv.cvut.cz/grass71/WinGRASS-7.1.svn-r61439-1037-Setup.exe
GRASS Version: 7.1.svn GRASS SVN Revision: 61439 Erstellungsdatum: 2014-07-29 Build Platform: i686-pc-mingw32 GDAL/OGR: 1.11.0 PROJ.4: 4.8.0 GEOS: 3.4.2 SQLite: 3.7.17 Python: 2.7.4 wxPython: 2.8.12.1 Platform: Windows-Vista-6.0.6002-SP2there is now added following access control to the current user:
grass71.py user: read, execute => allowed read => allowed
testing on other MS windows platforms very welcome!!! no chance here on my side to test with further windows boxes ( win 7, 8) at the moment.
follow-up: 18 comment:17 by , 10 years ago
Replying to hellik:
testing on other MS windows platforms very welcome!!! no chance here on my side to test with further windows boxes ( win 7, 8) at the moment.
Tested with Vista - issue is fixed. Can't test on XP at the moment.
Needs a backport to 7.0 ASAP.
comment:18 by , 10 years ago
comment:19 by , 10 years ago
Priority: | critical → major |
---|
as the fix seems to work, downgrading to priority: major.
keeping ticket open until more tests on different win boxes (win7, win8) are done.
comment:20 by , 10 years ago
If solved here, please check if also #1983 got solved at the same time.
comment:21 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
as it seems to be fixed, closing ticket. reopen if needed.
Screenshot of commad window with error message