Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Wed, 31 Jan 2024 13:30:21 +1100
From: Tim Cuthbertson <>
Subject: Bug: installed symlinks are unreadable on MacOS

I'm not subscribed to the mailing list, please CC me on replies.

Installed symlinks (specifically have permissions 0700
on MacOS, which means only the owner (typically root) can read them.

Symlink permissions can't be anything but 0777 on Linux, but on Mac they
can be set, and in this case are being inherited from the 077 umask in

$ ls -l
ls: cannot read symbolic link
Permission denied
lrwx------ 1 root wheel 7 Jan  1  1970

My fix (attached) is to use `umask 022`, which was already being used to
make directories. It's not practical to fix this by specifying the intended
permissions for this symlink, as setting link permissions requires the
nonstandard `-h` chmod flag, which presumably fails on other platforms.

First discovered when cross-building on MacOS for linux:

I've tested the fix works in nix. I am fairly confident the same issue
exists outside of Nix given the fix, but I haven't built musl before and
ran into unrelated errors.

 - Tim

Content of type "text/html" skipped

Download attachment "musl-chmod.patch" of type "application/octet-stream" (741 bytes)

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.