I have two symlinks pointing to the same target directory. ls shows one of them (the bad one) belonging to the 1001 user, the other to root. Any user other than 1001, even root, can list the directory using the good symlink, but not with the bad one. The 1001 user can use either one and they work.

# ls -ldn /opt
lrwxrwxrwx 1    0   0 12 Sep 27 12:54 good -> dir
lrwxrwxrwx 1 1001 100 12 Nov  7  2016 bad -> dir
drwxrwxr-x 9 1001 100 11 Jun  3  2016 dir
# id
uid=0(root) gid=0(root) groups=0(root)
# ls /opt/good
(directory entries...)
# ls /opt/bad
ls: cannot access /opt/bad: Permission denied

What could possibly be causing this? I was under the impression that a symlink's own permissions didn't matter on Linux. How do I fix it? How do I find all symlinks with this issue?

I'm using a Debian Linux system with kernel 4.4.76 and ZFS Is this a bug in the kernel and/or ZFS? Could it be some dead Solaris code left in ZFS that reads the symlink's own permissions?

1 Answer 1


Solaris doesn't care symlinks permission so I doubt ZFS code could be the culprit.

In any case, you might try the following workaround:

chown -h 0:0 /opt/bad

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .