(Imported from Trac #886, reported by alistra on 2011-09-18)
I have an umask 077 on my root user, but when i type:
cabal install --global pkg
or I have a global setting in my configuration file, cabal installs the package globally, but with root's umask.
cabal is a package manager and if I install a package globally, I expect it to be accessible globally.
(Imported comment by @dcoutts on 2011-09-18)
I believe this is fixed in Cabal-1.10. Could you please try that version and confirm?
Otherwise we'll have to take a look at what's going on. For reference for anyone looking into this. see Distribution.Simple.Utils:
-- * installing files
-- * File permissions
(Imported comment by alistra on 2011-09-23)
After reinstalling any package with umask 077 this happens at first at user trying to invoke ghci with cabal 0.10.2-r1
GHCi, version 7.0.4: http://www.haskell.org/ghc/ :? for help
/usr/lib/ghc-7.0.4/package.conf.d/package.cache: openBinaryFile: permission denied (Permission denied)
I just tested this and it seems this problem has been resolved, so I propose closing this ticket. If you are still having problems with this issue, please re-open or create a new issue.
My console output is long so I won't paste the whole thing, but basically sudo'ing to root, setting umask 077, installing a package and then loading ghci works fine with Ubuntu 14.04, ghc 7.6.3, cabal 1.16.0.