Windows 7 Permission Denied Problem on Cabal

Following a successful install of the Haskell Platform on MAC OSX, I proceed to update my Windows PC. Frustration followed. I am blocked by a "Permission Denied" error when I do a "Setup install":
ghc --make Setup
[58 of 58] Compiling Main ( Setup.hs, Setup.o ) Linking Setup.exe ...
Setup configure
Configuring Cabal-1.8.0.4...
Setup build
Preprocessing library Cabal-1.8.0.4... Building Cabal-1.8.0.4... Registering Cabal-1.8.0.4...
Setup install
Setup: permission denied
I changed the permission on folders in the "Haskell Platform" directories to "full control", without any effect. I have searched the web for help but could not find my problem. Can't help but think it is something trivial but what? Help appreciated. Ralph Hodgson, @ralphtq http://twitter.com/ralphtq

Providing more evidence of the issue by running cabal with -v flag: ... ... Linking... C:\Program Files (x86)\Haskell Platform\2009.2.0.2\bin\ar.exe -r dist\build\libHSCabal-1.8.0.4.a dist\build\Distribution\Compiler.o dist\build\Distribution\InstalledPackageInfo.o ... ... ... Registering Cabal-1.8.0.4... C:\Program Files (x86)\Haskell Platform\2009.2.0.2\bin\ghc-pkg.exe update - --global --no-user-package-conf --package-conf=dist\package.conf.inplace Creating C:\Users\Ralph\AppData\Local\Temp\Cabal-1.8.0.411920\Cabal-1.8.0.4\dist\setu p(and its parents) C:\Users\Ralph\AppData\Local\Temp\Cabal-1.8.0.411920\Cabal-1.8.0.4\dist\setu p\setup.exe install --verbose=2 directory dist\doc\html\Cabal does exist: False Creating C:\Program Files (x86)\Haskell\doc\Cabal-1.8.0.4 (and its parents) setup.exe: permission denied cabal: Error: some packages failed to install: Cabal-1.8.0.4 failed during the final install step. The exception was: exit: ExitFailure 1 cabal-install-0.8.2 depends on Cabal-1.8.0.4 which failed to install. C:\Users\Ralph> From: haskell-cafe-bounces@haskell.org [mailto:haskell-cafe-bounces@haskell.org] On Behalf Of Ralph Hodgson Sent: Monday, May 17, 2010 12:18 AM To: haskell-cafe@haskell.org Subject: [Haskell-cafe] Windows 7 Permission Denied Problem on Cabal Following a successful install of the Haskell Platform on MAC OSX, I proceed to update my Windows PC. Frustration followed. I am blocked by a "Permission Denied" error when I do a "Setup install":
ghc --make Setup
[58 of 58] Compiling Main ( Setup.hs, Setup.o ) Linking Setup.exe ...
Setup configure
Configuring Cabal-1.8.0.4...
Setup build
Preprocessing library Cabal-1.8.0.4... Building Cabal-1.8.0.4... Registering Cabal-1.8.0.4...
Setup install
Setup: permission denied
I changed the permission on folders in the "Haskell Platform" directories to "full control", without any effect. I have searched the web for help but could not find my problem. Can't help but think it is something trivial but what? Help appreciated. Ralph Hodgson, @ralphtq http://twitter.com/ralphtq

Hi, Try "Run as administrator" right click menu item for cmd.exe Regards, Zura -- View this message in context: http://old.nabble.com/Windows-7-Permission-Denied-Problem-on-Cabal-tp2858013... Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.

I wouldn't do this because the installed tools will be written with that elevated rights, so you can only invoke them from an elevated prompt, which is a bit cumbersome. -----Original Message----- From: haskell-cafe-bounces@haskell.org [mailto:haskell-cafe-bounces@haskell.org] On Behalf Of Zura_ Sent: Monday, May 17, 2010 10:12 To: haskell-cafe@haskell.org Subject: RE: [Haskell-cafe] Windows 7 Permission Denied Problem on Cabal Hi, Try "Run as administrator" right click menu item for cmd.exe Regards, Zura -- View this message in context: http://old.nabble.com/Windows-7-Permission-Denied-Problem-on-Cabal-tp2858013 1p28580510.html Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Right, the problem is that under windows 7 and vista the Program Files folder if not "yours" as in you don't have direct permission to write there without elevation. You could go to the Haskell folder, and grand your current user full rights, but any new tools installed will inherit the original and not modified permission (I believe). The other approach I like much better is instead of doing global installs, do user installs. In fact, I made it my default. Which solves any permission error, but means every user on that machine has to install the libs separately which shouldn't be a problem if you're the only one. To do this go to C:\Users\<username>\AppData\Roaming\cabal\ and open the file "config" in a text editor and inside that, uncomment the bit that says "user-install: True" That should do it. From: haskell-cafe-bounces@haskell.org [mailto:haskell-cafe-bounces@haskell.org] On Behalf Of Ralph Hodgson Sent: Monday, May 17, 2010 09:51 To: haskell-cafe@haskell.org Subject: RE: [Haskell-cafe] Windows 7 Permission Denied Problem on Cabal Providing more evidence of the issue by running cabal with -v flag: ... ... Linking... C:\Program Files (x86)\Haskell Platform\2009.2.0.2\bin\ar.exe -r dist\build\libHSCabal-1.8.0.4.a dist\build\Distribution\Compiler.o dist\build\Distribution\InstalledPackageInfo.o ... ... ... Registering Cabal-1.8.0.4... C:\Program Files (x86)\Haskell Platform\2009.2.0.2\bin\ghc-pkg.exe update - --global --no-user-package-conf --package-conf=dist\package.conf.inplace Creating C:\Users\Ralph\AppData\Local\Temp\Cabal-1.8.0.411920\Cabal-1.8.0.4\dist\setu p(and its parents) C:\Users\Ralph\AppData\Local\Temp\Cabal-1.8.0.411920\Cabal-1.8.0.4\dist\setu p\setup.exe install --verbose=2 directory dist\doc\html\Cabal does exist: False Creating C:\Program Files (x86)\Haskell\doc\Cabal-1.8.0.4 (and its parents) setup.exe: permission denied cabal: Error: some packages failed to install: Cabal-1.8.0.4 failed during the final install step. The exception was: exit: ExitFailure 1 cabal-install-0.8.2 depends on Cabal-1.8.0.4 which failed to install. C:\Users\Ralph> From: haskell-cafe-bounces@haskell.org [mailto:haskell-cafe-bounces@haskell.org] On Behalf Of Ralph Hodgson Sent: Monday, May 17, 2010 12:18 AM To: haskell-cafe@haskell.org Subject: [Haskell-cafe] Windows 7 Permission Denied Problem on Cabal Following a successful install of the Haskell Platform on MAC OSX, I proceed to update my Windows PC. Frustration followed. I am blocked by a "Permission Denied" error when I do a "Setup install":
ghc --make Setup
[58 of 58] Compiling Main ( Setup.hs, Setup.o ) Linking Setup.exe ...
Setup configure
Configuring Cabal-1.8.0.4...
Setup build
Preprocessing library Cabal-1.8.0.4... Building Cabal-1.8.0.4... Registering Cabal-1.8.0.4...
Setup install
Setup: permission denied
I changed the permission on folders in the "Haskell Platform" directories to "full control", without any effect. I have searched the web for help but could not find my problem. Can't help but think it is something trivial but what? Help appreciated. Ralph Hodgson, @ralphtq http://twitter.com/ralphtq

On 17 May 2010 09:37, Phyx
The other approach I like much better is instead of doing global installs, do user installs. In fact, I made it my default. Which solves any permission error, but means every user on that machine has to install the libs separately which shouldn’t be a problem if you’re the only one.
To do this go to C:\Users\<username>\AppData\Roaming\cabal\ and open the file “config” in a text editor and inside that, uncomment the bit that says “user-install: True”
This should be the new default on Windows as of Cabal-1.8.0.4 / cabal-install-0.8.4. Existing cabal config files will not be updated, but people installing for the first time should get this default. Perhaps Ralph can double check that for us. Ralph: note that this stuff with the config only applies if you run the "cabal" program, rather than compiling and running "Setup.exe". The latter is more low level, does not use any config file and has different defaults. Easier to stick to the "cabal.exe" program. Duncan

Thanks for your help - that worked beautifully. From: Phyx [mailto:lonetiger@gmail.com] Sent: Monday, May 17, 2010 1:38 AM To: rhodgson@topquadrant.com; haskell-cafe@haskell.org Subject: RE: [Haskell-cafe] Windows 7 Permission Denied Problem on Cabal Right, the problem is that under windows 7 and vista the Program Files folder if not "yours" as in you don't have direct permission to write there without elevation. You could go to the Haskell folder, and grand your current user full rights, but any new tools installed will inherit the original and not modified permission (I believe). The other approach I like much better is instead of doing global installs, do user installs. In fact, I made it my default. Which solves any permission error, but means every user on that machine has to install the libs separately which shouldn't be a problem if you're the only one. To do this go to C:\Users\<username>\AppData\Roaming\cabal\ and open the file "config" in a text editor and inside that, uncomment the bit that says "user-install: True" That should do it. From: haskell-cafe-bounces@haskell.org [mailto:haskell-cafe-bounces@haskell.org] On Behalf Of Ralph Hodgson Sent: Monday, May 17, 2010 09:51 To: haskell-cafe@haskell.org Subject: RE: [Haskell-cafe] Windows 7 Permission Denied Problem on Cabal Providing more evidence of the issue by running cabal with -v flag: ... ... Linking... C:\Program Files (x86)\Haskell Platform\2009.2.0.2\bin\ar.exe -r dist\build\libHSCabal-1.8.0.4.a dist\build\Distribution\Compiler.o dist\build\Distribution\InstalledPackageInfo.o ... ... ... Registering Cabal-1.8.0.4... C:\Program Files (x86)\Haskell Platform\2009.2.0.2\bin\ghc-pkg.exe update - --global --no-user-package-conf --package-conf=dist\package.conf.inplace Creating C:\Users\Ralph\AppData\Local\Temp\Cabal-1.8.0.411920\Cabal-1.8.0.4\dist\setu p(and its parents) C:\Users\Ralph\AppData\Local\Temp\Cabal-1.8.0.411920\Cabal-1.8.0.4\dist\setu p\setup.exe install --verbose=2 directory dist\doc\html\Cabal does exist: False Creating C:\Program Files (x86)\Haskell\doc\Cabal-1.8.0.4 (and its parents) setup.exe: permission denied cabal: Error: some packages failed to install: Cabal-1.8.0.4 failed during the final install step. The exception was: exit: ExitFailure 1 cabal-install-0.8.2 depends on Cabal-1.8.0.4 which failed to install. C:\Users\Ralph> From: haskell-cafe-bounces@haskell.org [mailto:haskell-cafe-bounces@haskell.org] On Behalf Of Ralph Hodgson Sent: Monday, May 17, 2010 12:18 AM To: haskell-cafe@haskell.org Subject: [Haskell-cafe] Windows 7 Permission Denied Problem on Cabal Following a successful install of the Haskell Platform on MAC OSX, I proceed to update my Windows PC. Frustration followed. I am blocked by a "Permission Denied" error when I do a "Setup install":
ghc --make Setup
[58 of 58] Compiling Main ( Setup.hs, Setup.o ) Linking Setup.exe ...
Setup configure
Configuring Cabal-1.8.0.4...
Setup build
Preprocessing library Cabal-1.8.0.4... Building Cabal-1.8.0.4... Registering Cabal-1.8.0.4...
Setup install
Setup: permission denied
I changed the permission on folders in the "Haskell Platform" directories to "full control", without any effect. I have searched the web for help but could not find my problem. Can't help but think it is something trivial but what? Help appreciated. Ralph Hodgson, @ralphtq http://twitter.com/ralphtq
participants (4)
-
Duncan Coutts
-
Phyx
-
Ralph Hodgson
-
Zura_