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

Hackage trac at galois.com
Wed Jan 28 09:23:23 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 duncan):

 Replying to [comment:8 Toxaris]:

 Thanks for the details.

 > I use a user account in the local administrator group. I have used a
 administrator console to run the following tests (see #320).
 > [...]
 > All tests yielded identical results, namely:
 >
 > "c:\program files\Haskell\bin\hoogle.exe" was replaced by a file with no
 permissions set for "all users", but permissions set for "administrators".
 The file does not inherit the permissions set for "c:\program
 files\Haskell\bin" (read and execute allowed for "all users").

 So the interesting thing is why copying an .exe into `c:\program
 files\Haskell\bin` does not create a file that inherits the permissions of
 that directory. I think that is what I would have expected, or at least
 hoped.

 It is not surprising or problematic that when running cabal as
 administrator that the `.exe` files generated are executable only by
 administrator, however I was under the impression that when copying files,
 the ACLs are not copied and the new file gets default permissions based on
 the directory it is created in.

 It turns out that the Haskell `copyFile` function does not copy
 permissions (though it does try to, this turns out not to be effective on
 Windows, which actually is what we want).

 I'm interested in what happens when one creates an ordinary file in
 `c:\program files\Haskell\bin` when running as the administrator user. For
 example if one creates a simple `foo.txt` file, does that inherit the
 permission read and execute allowed for "all users"? If so, is the same
 true if we rename or copy `foo.txt`

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


More information about the cabal-devel mailing list