1
1
I can mount a remote directory to /home/user/mnt
and can see symbolic links via ls
of that directory, but I cannot r,w, or x the links. I mount using the code below, using RSA key pairs for automatic authentication.
$ sshfs my.server.ip:/remote/dir /home/user/mnt
$ ls -alh ~/mnt/file.txt -o allow_other,follow_symlink,uid=1000,gid=100
-rwxr-x---. 1 user users 1.6K Mar 22 8:00 /home/user/mnt/file.txt
$ cat ~/mnt/file.txt
#Some Text
The remote folder is mounted without error. I can list and read the file file.txt
as expected.
When I try to ls and read file_symlink.txt
I get:
$ ls -alh ~/mnt/file_symlink.txt
-rwxr-x---. 1 user users 1.6K Mar 22 8:00 /home/user/mnt/file_symlink.txt
$ cat ~/mnt/file_symlink.txt
cat: /home/user/mnt/file_symlink.txt: Permission Denied
I can see it, but am denied permission.
I have tried many different sshfs
options. Same behavior when I try running via sudo
also.
An inconsistency to me is that ls -alh file_symlink.txt
shows the symlink as a regular file, rather than as a link. I think this is a result of the follow_symlink
option, but when I mount without this option, I can still read the original file.txt
as before, but when I go to access file_symlink.txt
I get these results:
$ sshfs my.server.ip:/remote/dir /home/user/mnt -o allow_other,uid=1000,gid=100
$ ls -alh ~/mnt/file_symlink.txt
ls: cannot read symbolic link /home/user/mnt/file_symlink.txt: No such file or directory
lrwxrwxrwx. 1 user users 11 Mar 22 8:00 /home/user/mnt/file_symlink.txt
$ cat ~/mnt/file_symlink.txt
cat: /home/user/mnt/file_symlink.txt: No such file or directory
ls
first says the link doesn't exist, but then lists it, huh?
If anyone knows enough about sshfs
to clarify the behavior I am seeing, that would be awesome! Thanks!
I am also open to other methods of remote mounting drive
versions: Fedora 23 4.4.3-300.fc23.x86_64 SSHFS version 2.5 FUSE library version: 2.9.4 fusermount version: 2.9.4 using FUSE kernel interface version 7.19