[Hackage] #454: file permissions of installed files on windows

Hackage trac at galois.com
Wed Jan 28 14:40:50 EST 2009


#454: file permissions of installed files on windows
----------------------------+-----------------------------------------------
  Reporter:  Toxaris        |        Owner:           
      Type:  defect         |       Status:  new      
  Priority:  normal         |    Milestone:  Cabal-1.6
 Component:  Cabal library  |      Version:  1.6.0.1  
  Severity:  normal         |   Resolution:           
  Keywords:                 |   Difficulty:  normal   
Ghcversion:  6.10.1         |     Platform:  Windows  
----------------------------+-----------------------------------------------
Comment (by Toxaris):

 I did some more tests, all of them from an Administrator console (to
 access `c:\Program Files\Haskell\bin` at all). I compared `ghc -e
 "System.Directory.copyFile \"from\" \"to\""`, `ghc -e
 "System.Directory.renameFile \"from\" \"to\""`, `copy from to` and `move
 from to`. Results:

 `copy` and `copyFile` create or overwrite a file, last changed now, with
 default permissions for the target directory.

 `move` and `renameFile` create or overwrite a file, last changed whenever
 the source file was, with the source file permissions set and the target
 directory permissions not inherited.


 While testing, I realized that this problem affects not only executables,
 but packages too. I cannot use newly installed packages without
 Administrator privileges enabled.

 {{{
 C:\ghc\ghc-6.10.1\gcc-lib\ld.exe: cannot find -lHSuniplate-1.2.0.3
 collect2: ld returned 1 exit status
 }}}

 Indeed, the files in `C:\Program
 Files\Haskell\uniplate-1.2.0.3\ghc-6.10.1` have the same restrictive
 permissions set as the executables, while the folders have the correct,
 inherited permissions.


 As a manual workaround, I figured out that the following command can be
 used to reset all permissions to folder defaults: `icacls "C:\Program
 Files\Haskell" /reset /T`. With folder defaults, I have no access problems
 so far.

-- 
Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/454#comment:10>
Hackage <http://haskell.org/cabal/>
Hackage: Cabal and related projects


More information about the cabal-devel mailing list