#16348·nix

Symlink permissions aren't canonicalised on BSDs and Darwin

Author: xokdviumCreated Aug 21, 2026Updated Sep 17, 2026
Labelsbug

Describe the bug

Steps To Reproduce

Unlike Linux, where symlinks get 0777 permission bits regardless and can't be changed, apparently macos and some other BSDs do carry permission bits around (it's not clear to me whether they do anything useful though).

   -h         If the file is a symbolic link, change the mode of the link
              itself rather than the file that the link points to.

https://pubs.opengroup.org/onlinepubs/9699919799/functions/chmod.html

AT_SYMLINK_NOFOLLOW If path names a symbolic link, then the mode of the symbolic link is changed.

[EOPNOTSUPP] The AT_SYMLINK_NOFOLLOW bit is set in the flag argument, path names a symbolic link, and the system does not support changing the mode of a symbolic link.

I'd presume that macOS does support AT_SYMLINK_NOFOLLOW in that context, unlike Linux.

I've confirmed this by looking into my store on a macOS machine and yes there are 755 symlinks in there.

Expected behavior

Symlink permissions are canonicalised too. Currently newly created files are restricted by the umask.

Metadata

Additional context

Checklist


Add :+1: to issues you find important.