Ticket #93 (new defect)

Opened 2 years ago

Last modified 4 months ago

Incorrect permissions on library install

Reported by: guest Assigned to:
Priority: normal Milestone: Cabal-1.8
Component: Cabal library Version: 1.1.4
Severity: normal Keywords:
Cc: Difficulty: normal
GHC Version: 6.4.2 Platform: Linux

Description

My user umask is 0007 and my root umask is 0022. When I build a library with cabal and then install with: # sudo runghc Setup.hs install

The library which is installed doesn't have the correct permissions for cabal to be able to reference it later when I build other things.

My work around is to follow the install with the following command: # sudo chmod -R a+rX /path/to/new/library

This happens on all versions of cabal that I have tried.

Change History

10/20/06 10:24:09 changed by duncan

Isaac suggested a fix:

So we could use the current permissions in the tree (which we attempt to set correctly for executables). If the setup file changes them, so be it. We set the owner as the installer, and if it's --user, leave it at that, if it's --global, project the user permissions for group and global. (If root is installing it, we change the owner to root so projecting user permissions will then work).

10/20/06 10:25:59 changed by duncan

  • milestone set to Cabal-1.2.

01/24/08 08:02:02 changed by duncan

  • milestone changed from Cabal-1.2 to Cabal-1.4.

03/12/08 06:20:51 changed by duncan

  • milestone changed from Cabal-1.4 to Cabal-1.6.

This is actually quite hard because we have no way in Haskell of portably setting the permissions bits for user/group/other.

We could do it perhaps if we used cpp and used functions from the posix lib.

I'm punting from the immediate milestone.

08/15/08 07:10:57 changed by duncan

  • milestone changed from Cabal-1.6 to Cabal-1.8.