2 added 89 characters in body
source | link

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 0.6.5.9. 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?

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 0.6.5.9. Is this a bug in the kernel and/or ZFS?

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 0.6.5.9. 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
source | link

Symlink permission issue on Linux + ZFS

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 0.6.5.9. Is this a bug in the kernel and/or ZFS?