System.Directory.getPermissions crashes when checking file on read-only file system

Alain O'Dea alain.odea at gmail.com
Wed Feb 5 04:34:20 UTC 2014


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

Is this a Cabal bug or a directory library bug?

I am happy to contribute to fixing this in any way I can.

Best,
Alain


More information about the Libraries mailing list