[GHC] #8741: `System.Directory.getPermissions` fails on read-only filesystem

GHC ghc-devs at haskell.org
Wed Feb 5 21:54:43 UTC 2014


#8741: `System.Directory.getPermissions` fails on read-only filesystem
-------------------------------------+-------------------------------------
       Reporter:  hvr                |             Owner:
           Type:  bug                |            Status:  new
       Priority:  high               |         Milestone:
      Component:                     |           Version:  7.6.3
  libraries/directory                |  Operating System:  POSIX
       Keywords:                     |   Type of failure:  Incorrect result
   Architecture:  Unknown/Multiple   |  at runtime
     Difficulty:  Unknown            |         Test Case:
     Blocked By:                     |          Blocking:
Related Tickets:                     |
-------------------------------------+-------------------------------------
 Alain O'Dea reports in an
 [http://permalink.gmane.org/gmane.comp.lang.haskell.libraries/21078 email]
 that:

 {{{
 Prelude> System.Directory.getPermissions "/usr/bin/ld"
 *** Exception: /usr/bin/ld: fileAccess: permission denied (Read-only file
 system)
 }}}
 > That seems wrong.
 >
 > An `access(*, W_OK)` syscall by design should return `EROFS` on a read-
 only file system by specification.
 >
 > This breaks Cabal on SmartOS since `/usr` is read-only by design and
 Cabal calls `getPermissions "/usr/bin/ld"`.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8741>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list