Symlinks not accessible when mounting with sshfs
Franco Martelli <[email protected]> Mon, 27 Jul 2026 15:44:17 +0200
| Newsgroups | gmane.linux.debian.user |
|---|---|
| Message-ID | <[email protected]> |
Hi, I've the following issue with sshfs while it doesn't happen when I login using ssh: root@itek:~# sshfs rpi:/ /media/raspberrypi root@itek:~# LC_ALL=C.UTF-8 ls -l -a -h /media/raspberrypi/etc/alternatives/rsh ls: cannot read symbolic link '/media/raspberrypi/etc/alternatives/rsh': Operation not permitted lrwxrwxrwx 1 root root 12 Nov 27 2019 /media/raspberrypi/etc/alternatives/rsh root@itek:~# /bin/fusermount -u /media/raspberrypi/ root@itek:~# ssh rpi [...] root@raspberrypi:~# LC_ALL=C.UTF-8 ls -l -a -h /etc/alternatives/rsh lrwxrwxrwx 1 root root 12 Nov 27 2019 /etc/alternatives/rsh -> /usr/bin/ssh I pick "/etc/alternatives/rsh" as case test but many symlinks cannot be read when mounting the filesystem via sshfs. I don't want to use the option "follow_symlinks": root@itek:~# sshfs -o follow_symlinks rpi:/ /media/raspberrypi root@itek:~# LC_ALL=C.UTF-8 ls -l -a -h /media/raspberrypi/etc/alternatives/rsh -rwxr-xr-x 1 root root 771K Apr 16 18:19 /media/raspberrypi/etc/alternatives/rsh root@itek:~# /bin/fusermount -u /media/raspberrypi/ because sshfs replace the symlink with the pointed file, I just want the symlink be readable. Does anybody know how to accomplish that? Thank you very much for any hint, kind regards.