Skip to content

when installing globally, cabal shouldn't use umask, should set mods to 755 or 644 #876

Closed
bos opened this Issue May 24, 2012 · 3 comments

3 participants

@bos
Haskell member
bos commented May 24, 2012

(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.

@bos
Haskell member
bos commented May 24, 2012

(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
        installOrdinaryFile,
        installExecutableFile,
        installOrdinaryFiles,
        installDirectoryContents,
        -- * File permissions
        setFileOrdinary,
        setFileExecutable,
@bos
Haskell member
bos commented May 24, 2012

(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)
@jsl
jsl commented Feb 28, 2015

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.

@ttuegel ttuegel closed this Feb 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.