libfuse / sshfs Goto Github PK
View Code? Open in Web Editor NEWA network filesystem client to connect to SSH servers
License: GNU General Public License v2.0
A network filesystem client to connect to SSH servers
License: GNU General Public License v2.0
I note that the CanonicalDomains
and KexAlgorithms
options are missing from ssh_opts[]
.
I'm guessing that others may be missing, too.
When I do:
git clone https://libfuse/sshfs
cd sshfs
git checkout sshfs-2.9
mkdir build
cd build
meson ..
What I expect to happen:
build files created ok!
What actually happens:
(root) ~/git-local/sshfs/build (HEAD (no branch)|✔) $ meson ..
Error during basic setup:
Neither directory contains a build file meson.build.
Hello,
I'd like to run a container which mount some folder by sshfs and share it via a volume.
I succeeded mounting the files in a directory inside the container (say /data/), but from my host, I can't see anything (running my docker container with -v /home/user/data:/data/).
Is it possible?
Thanks
If I'm copying something from an sshfs mount point to a local drive with Nautilus there is no progress indicator and I must watch network activity in System Monitor in order to hopefully see when the copy operation is finished.
Arch Linux:
Nautilus 3.24.1
sshfs 2.9-1
I have a symlink in the folder that I mounted, but when I tried to open it in Finder, it failed. When I tried to list its content in a terminal, what I got is listing the symlink as a file itself. It seems sshfs is unable to follow symlinks.
This is more of a question than an issue, but basically I want to be able to programmatically mount and unmount sshfs filesystems. I'd rather not have to shell out to run the command line tool.
When the path to a file exceeds a limit, the path is truncated and results in a 'file not found' error on the remote host, failing to operate on the file. In my case, I tried to open a file and failed, turning on debug allowed me to discover this issue.
Hi,
I tried to configure sshfs after installing the prerequisites, but I couldn't succeed. It keeps saying me that glib2 dev is not installed...
I'm on Ubuntu 15.10. Could you help me ? Thanks
first issue is that it's only checking for the "fuse" package
second issue is that it doesn't support the 3.x APIs
In file included from /usr/local/include/fuse3/fuse.h:19:0,
from sshfs.c:12:
/usr/local/include/fuse3/fuse_common.h:724:4: error: #error only API version 30 or greater is supported
Background: Trying to a) mount resources from two remote SFTP servers and b) provide them for Windows hosts via Samba. The Samba part is likely irrelevant and the following examples are not done via Samba. On one of the SFTP servers everything works OK. On the other I have strange issues when trying to create a new file on an sshfs mount. The remote users seem to be chrooted and I don't have any shell access.
Sshfs versions on Centos 7:
SSHFS version 2.5 FUSE library version: 2.9.2 fusermount version: 2.9.2 using FUSE kernel interface version 7.19
also tried with Fedora 25:
SSHFS version 2.8 FUSE library version: 2.9.7 fusermount version: 2.9.7 using FUSE kernel interface version 7.19
Symptoms:
touch remote/foo
touch: cannot touch 'remote/foo’: No such file or directory
However, 'foo' is created. Now when I try to touch the same file again, no issues. Similarily:
echo bar > remote/foo2
-bash: remote/foo2: No such file or directory
Again, foo2 is created, but is empty. Now if I issue the same command the second time, there's no error and foo2 contains 'bar'. Cp seems to behave in a similar fashion and vim claims that 'swap file already exists' for every new file.
A few things I've tried so far:
An example mount command is:
echo password | sshfs -o reconnect,ServerAliveInterval=30,ServerAliveCountMax=6,allow_other,uid=1000,gid=1000,umask=0077,sshfs_debug,debug,loglevel=debug,password_stdin [email protected]: basware_invoice/
(SSH keys not supported, thus the password from stdin)
Below is a partial debug output when trying to touch basware_invoice/IN/4900/test/foo2 twice. Full output: https://paste.fedoraproject.org/526294/48423812/
...
unique: 5, opcode: LOOKUP (1), nodeid: 4, insize: 45, pid: 29076
LOOKUP /IN/4900/test/foo2
getattr /IN/4900/test/foo2
[00004] LSTAT
[00004] STATUS 36bytes (53ms)
unique: 5, error: -2 (No such file or directory), outsize: 16
unique: 6, opcode: CREATE (35), nodeid: 4, insize: 61, pid: 29076
create flags: 0x8841 /IN/4900/test/foo2 0100664 umask=0002
[00005] OPEN
[00006] LSTAT
[00005] HANDLE 17bytes (53ms)
[00006] STATUS 36bytes (53ms)
[00007] CLOSE
unique: 6, error: -2 (No such file or directory), outsize: 16
unique: 7, opcode: LOOKUP (1), nodeid: 4, insize: 45, pid: 29076
LOOKUP /IN/4900/test/foo2
getattr /IN/4900/test/foo2
[00008] LSTAT
[00008] ATTRS 33bytes (54ms)
NODEID: 5
unique: 7, success, outsize: 144
[00007] STATUS 23bytes (56ms)
unique: 8, opcode: SETATTR (4), nodeid: 5, insize: 128, pid: 29076
utime /IN/4900/test/foo2 1484235677 1484235677
[00009] SETSTAT
[00009] STATUS 23bytes (53ms)
getattr /IN/4900/test/foo2
[00010] LSTAT
[00010] ATTRS 33bytes (53ms)
unique: 8, success, outsize: 120
unique: 9, opcode: REMOVEXATTR (24), nodeid: 5, insize: 53, pid: 29076
unique: 9, error: -38 (Function not implemented), outsize: 16
unique: 10, opcode: LOOKUP (1), nodeid: 1, insize: 43, pid: 29080
LOOKUP /IN
getattr /IN
NODEID: 2
unique: 10, success, outsize: 144
unique: 11, opcode: LOOKUP (1), nodeid: 2, insize: 45, pid: 29080
LOOKUP /IN/4900
getattr /IN/4900
NODEID: 3
unique: 11, success, outsize: 144
unique: 12, opcode: LOOKUP (1), nodeid: 3, insize: 45, pid: 29080
LOOKUP /IN/4900/test
getattr /IN/4900/test
NODEID: 4
unique: 12, success, outsize: 144
unique: 13, opcode: LOOKUP (1), nodeid: 4, insize: 45, pid: 29080
LOOKUP /IN/4900/test/foo2
getattr /IN/4900/test/foo2
NODEID: 5
unique: 13, success, outsize: 144
unique: 14, opcode: OPEN (14), nodeid: 5, insize: 48, pid: 29080
open flags: 0x8801 /IN/4900/test/foo2
[00011] OPEN
[00012] LSTAT
[00011] HANDLE 17bytes (53ms)
[00012] ATTRS 33bytes (53ms)
open[140467643618192] flags: 0x8801 /IN/4900/test/foo2
unique: 14, success, outsize: 32
unique: 15, opcode: FLUSH (25), nodeid: 5, insize: 64, pid: 29080
flush[140467643618192]
unique: 15, success, outsize: 16
unique: 16, opcode: SETATTR (4), nodeid: 5, insize: 128, pid: 29080
utime /IN/4900/test/foo2 1484235690 1484235690
[00013] SETSTAT
[00013] STATUS 23bytes (52ms)
getattr /IN/4900/test/foo2
[00014] LSTAT
[00014] ATTRS 33bytes (53ms)
unique: 16, success, outsize: 120
unique: 17, opcode: FLUSH (25), nodeid: 5, insize: 64, pid: 29080
flush[140467643618192]
unique: 17, success, outsize: 16
unique: 18, opcode: RELEASE (18), nodeid: 5, insize: 64, pid: 0
release[140467643618192] flags: 0x8801
[00015] CLOSE
unique: 18, success, outsize: 16
[00015] STATUS 23bytes (52ms)
strace touch (initial, failing):
[sftpuser@sftpproxy ~]$ strace touch basware_invoice/IN/4900/test/foo2
execve("/bin/touch", ["touch", "basware_invoice/IN/4900/test/foo"...], [/* 18 vars */]) = 0
brk(0) = 0xf91000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f69df72a000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=23927, ...}) = 0
mmap(NULL, 23927, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f69df724000
close(3) = 0
open("/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@\34\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=2118128, ...}) = 0
mmap(NULL, 3932672, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f69df14b000
mprotect(0x7f69df301000, 2097152, PROT_NONE) = 0
mmap(0x7f69df501000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b6000) = 0x7f69df501000
mmap(0x7f69df507000, 16896, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f69df507000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f69df723000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f69df721000
arch_prctl(ARCH_SET_FS, 0x7f69df721740) = 0
mprotect(0x7f69df501000, 16384, PROT_READ) = 0
mprotect(0x60d000, 4096, PROT_READ) = 0
mprotect(0x7f69df72b000, 4096, PROT_READ) = 0
munmap(0x7f69df724000, 23927) = 0
brk(0) = 0xf91000
brk(0xfb2000) = 0xfb2000
brk(0) = 0xfb2000
open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=106070960, ...}) = 0
mmap(NULL, 106070960, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f69d8c22000
close(3) = 0
open("basware_invoice/IN/4900/test/foo2", O_WRONLY|O_CREAT|O_NOCTTY|O_NONBLOCK, 0666) = -1 ENOENT (No such file or directory)
utimensat(AT_FDCWD, "basware_invoice/IN/4900/test/foo2", NULL, 0) = 0
close(1) = 0
close(2) = 0
exit_group(0) = ?
+++ exited with 0 +++
strace touch (second time, succeeds):
[sftpuser@sftpproxy ~]$ strace touch basware_invoice/IN/4900/test/foo2
execve("/bin/touch", ["touch", "basware_invoice/IN/4900/test/foo"...], [/* 18 vars */]) = 0
brk(0) = 0x6e8000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f84ac77b000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=23927, ...}) = 0
mmap(NULL, 23927, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f84ac775000
close(3) = 0
open("/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@\34\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=2118128, ...}) = 0
mmap(NULL, 3932672, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f84ac19c000
mprotect(0x7f84ac352000, 2097152, PROT_NONE) = 0
mmap(0x7f84ac552000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b6000) = 0x7f84ac552000
mmap(0x7f84ac558000, 16896, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f84ac558000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f84ac774000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f84ac772000
arch_prctl(ARCH_SET_FS, 0x7f84ac772740) = 0
mprotect(0x7f84ac552000, 16384, PROT_READ) = 0
mprotect(0x60d000, 4096, PROT_READ) = 0
mprotect(0x7f84ac77c000, 4096, PROT_READ) = 0
munmap(0x7f84ac775000, 23927) = 0
brk(0) = 0x6e8000
brk(0x709000) = 0x709000
brk(0) = 0x709000
open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=106070960, ...}) = 0
mmap(NULL, 106070960, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f84a5c73000
close(3) = 0
open("basware_invoice/IN/4900/test/foo2", O_WRONLY|O_CREAT|O_NOCTTY|O_NONBLOCK, 0666) = 3
dup2(3, 0) = 0
close(3) = 0
utimensat(0, NULL, NULL, 0) = 0
close(0) = 0
close(1) = 0
close(2) = 0
exit_group(0) = ?
+++ exited with 0 +++
I have a peculiar case with one fuse sshfs mount shared over samba with a couple of windows workstations. I have narrowed down the case to interoperability - it's not network, it's not SMB protocols used, it's not ssh nor samba versions on the machine sharing the files over samba. The data doesn't get corrupted when using sshfs/sftp alone.
So the case is: every 4k-th byte in the target file gets zeroed. Does anyone have a clue what could be happening?
See there: borgbackup/borg#664
SFTP transfers file attributes on readdir(), so we should really pass this information on to FUSE.
Don't forget to also add this in the caching layer!
Hi there,
I use sshfs within my vagrant setup to synchronize my working directory.
unfortunately I encounter the following error when building my debian package:
dh_install
cp: failed to preserve ownership for ‘debian/scripts’: Permission denied
dh_install: cp -a debian/tmp/scripts debian/mypkg/usr/share/mypkg/ returned exit code 1
do you know how I could fix this issue?
I tried different sshfs options but nothing seems to satisfy debuild/fakeroot
-o readdir_ino -o default_permissions -o big_writes -o workaround=all -o uid=1000 -o gid=1000
the version of sshfs
ii sshfs 2.5-1 amd64 filesystem client based on SSH File Transfer Protocol
I have added the following entry in /etc/fstab
to mount a share in my gome directory:
[email protected]:/home /home/py/py-nas fuse.sshfs noauto,x-systemd.automount,_netdev,noatime,user,nonempty,idmap=user,uid=1000,gid=1000,identityfile=/home/py/.ssh/id_rsa,allow_other,default_permissions,reconnect 0 0
It works fine but it appears twice as you can see here under. I think it only happen with fuse.sshfs
filesystems
Inside a sshfs mount point, ls -a
should show the two "." and ".." entries, but it doesn't.
KDE KIO 5.25 (and hence Dolphin) uses the "." entry to get info about the current directory and determine if the 'Paste' action should be enabled or not, which causes it to be disabled inside sshfs mounts.
can i mount local disk /dev/sda by sshfs?
eg sshfs user@localhost:/dev/sda /mnt
On Mac OS X, branch 'master':
When I do:
git clone https://libfuse/sshfs
cd sshfs
mkdir build
cd build
meson ..
ninja
What I expect to happen:
build finished ok
What actually happens:
(root) ~/git-local/sshfs/build (master|…1) $ ninja
[1/3] Generating test_scripts with a custom command.
FAILED: test/conftest.py test/pytest.ini test/test_sshfs.py test/util.py
cp -fPu --preserve=mode ../test/conftest.py ../test/pytest.ini ../test/test_sshfs.py ../test/util.py /Users/hugh2/git-local/sshfs/build/test
cp: illegal option -- u
Full Disclosure: X-Post from http://superuser.com/q/1057060/509930
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, with RSA key pairs for authentication.
$ sshfs -o allow_other,follow_symlink,uid=1000,gid=100 my.server.ip:/remote/dir /home/user/mnt
$ ls -alh ~/mnt/file.txt
-rwxr-x---. 1 user users 1.6K Mar 14 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 14 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.
The glaring 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:
$ sshfs -o allow_other,uid=1000,gid=100 my.server.ip:/remote/dir /home/user/mnt
$ 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 14 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 file doesn't exist, but then lists the link with the link specification?
If anyone knows enough about sshfs
to clarify the behavior I am seeing, that would be awesome! Thanks!
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
Have ~/.ssh/config setup to multiplex connections to all hosts. I don't want sshfs to multiplex its connection, however, so I'm invoking:
sshfs host /mount/point -o ControlMaster=yes,ControlPath=none
expecting that no control sockets will be created. I've checked and using:
ssh -o ControlMaster=yes,ControlPath=none host
Correctly overrides the settings in ~/.ssh/config.
It seems that sshfs is not applying the command-line options in such a way that that properly override the ~/.ssh/config settings.
I have also tried creating a separate ~/.ssh/special.config file and used:
sshfs -F ~/.ssh/special.config
In this case as well, the options used are the ones set in ~/.ssh/config rather than the ones set in ~/.ssh/special.config
what's going on???
SSHFS version 2.5
FUSE library version: 2.9.4
fusermount version: 2.9.4
using FUSE kernel interface version 7.19
Hey, there.
There's a line in configure.ac called
PKG_CHECK_MODULES(SSHFS, [fuse >= 2.3 glib-2.0 gthread-2.0])
My bitbake chokes on it and gives a syntax error. I don't know if it's a version compatibility issue or wot, but I find that all my problems vanish if I change the line to
PKG_CHECK_MODULES([SSHFS], [fuse >= 2.3 glib-2.0 gthread-2.0])
Just wanted to mention it.
The last few months I've been experiencing hangs on my system when using sshfs, I upgraded from 2.7 to 2.8 in early-mid august.
Today I reverted back to 2.7 and was completely hang free. I've going to leave sshfs at 2.7 for a few more days and see if I experience anymore hangs but this weekend I'll be putting 2.8 and seeing if it hangs again. But atm it looks like 2.8 caused a serious regression.
sshfs version: 2.8-1 (ubuntu zesty)
sshfs couldn't mount hosts by thier ipv6 link-local addresses:
sshfs -d -p 2222 'fe80::c60b:cbff:fea4:f9d7%wlan0' ~/mount
FUSE library version: 2.9.7
nullpath_ok: 0
nopath: 0
utime_omit_ok: 0
ssh: Could not resolve hostname fe80: Name or service not known
read: Connection reset by peer
SSH by itself deals with such addresses with no problems:
ssh -v -p 2222 'fe80::c60b:cbff:fea4:f9d7%wlan0'
OpenSSH_7.4p1 Ubuntu-10ubuntu0.1, OpenSSL 1.0.2g 1 Mar 2016
debug1: Reading configuration data /home/amarao/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 1: Deprecated option "useroaming"
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to fe80::c60b:cbff:fea4:f9d7%wlan0 [fe80::c60b:cbff:fea4:f9d7%wlan0] port 2222.
debug1: Connection established.
debug1: identity file /home/amarao/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /home/amarao/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/amarao/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/amarao/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/amarao/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/amarao/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/amarao/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/amarao/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.4p1 Ubuntu-10ubuntu0.1
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.1
debug1: match: OpenSSH_7.1 pat OpenSSH* compat 0x04000000
debug1: Authenticating to fe80::c60b:cbff:fea4:f9d7%wlan0:2222 as 'amarao'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: [email protected]
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: none
debug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:FAAcs3AWGffRT/jUO1BBx6K7KuwQChXHOJh0j1LGy+Y
debug1: Host '[fe80::c60b:cbff:fea4:f9d7%wlan0]:2222' is known and matches the ECDSA host key.
debug1: Found key in /home/amarao/.ssh/known_hosts:883
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_SERVICE_ACCEPT received
SSHelper Version 8.8 Copyright 2014, P. Lutus
Default password is "admin" (recommend: change it)
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/amarao/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 279
debug1: Authentication succeeded (publickey).
Authenticated to fe80::c60b:cbff:fea4:f9d7%wlan0 ([fe80::c60b:cbff:fea4:f9d7%wlan0]:2222).
debug1: channel 0: new [client-session]
debug1: Requesting [email protected]
debug1: Entering interactive session.
debug1: pledge: network
debug1: client_input_global_request: rtype [email protected] want_reply 0
debug1: Sending environment.
debug1: Sending env LC_ALL = en_US.UTF-8
debug1: Sending env LC_MEASUREMENT = ru_RU.UTF-8
debug1: Sending env LC_PAPER = ru_RU.UTF-8
debug1: Sending env LC_MONETARY = ru_RU.UTF-8
debug1: Sending env LANG = en_US.UTF-8
debug1: Sending env LC_NAME = ru_RU.UTF-8
debug1: Sending env LC_ADDRESS = ru_RU.UTF-8
debug1: Sending env LC_NUMERIC = ru_RU.UTF-8
debug1: Sending env LC_TELEPHONE = ru_RU.UTF-8
debug1: Sending env LC_IDENTIFICATION = ru_RU.UTF-8
debug1: Sending env LC_TIME = ru_RU.UTF-8
Mi_Phone:3.18.20-perf-g754a26d
u0_a119@msm8996:/data/data/com.arachnoid.sshelper/home $
Hi all,
sshfs --version
SSHFS version 2.8
FUSE library version: 2.5.0
fusermount version: 2.5.0
using FUSE kernel interface version 7.5
I am trying to mount remote windows filesystem folder to linux server. I have installed openSSH on windows pc and sshfs on my linux server.
` sshfs -o allow_other [email protected]:/cygdrive/d/test /mnt/`
error comes as:
[email protected]:/cygdrive/d/test: type of file differs from mountpoint
How to resolve this?
trying to compile it under cygwin. but ... there's no configure, and configure.ac is not runnable in bash... how to compile?
SFTP does provide link counts, so we should use these numbers for st_nlink.
Same as this and this bug I think. How I can reliably reproduce:
This makes using sshfs on laptop not very viable.
I upgraded libc6 on a stock Ubuntu 14.04 server to Xenial (16.04), which caused sshfs to stop being able to mount anything. I reverted all packages back to trusty-updates, but the problem persists. I appear to have replicated the bug reported at http://unix.stackexchange.com/questions/299730/unable-to-mount-any-remote-filesystem-using-sshfs.
The version of sshfs was 2.5.1. I uninstalled and then installed the latest version from this Github repo, to no avail.
sshfs --version
SSHFS version 2.8
FUSE library version: 2.9.2
fusermount version: 2.9.2
using FUSE kernel interface version 7.19
Before mounting (as normal user):
ls -lh
drwxrwxr-x 2 user user 4.0K Dec 25 00:10 mnt/
Then attempting to mount:
sshfs [email protected]:/media/drive /home/user/mnt
fusermount: failed to access mountpoint /home/user/mnt: Permission denied
ls -lh
ls: cannot access mnt: Transport endpoint is not connected
d????????? ? ? ? ? ? mnt/
The messed up directory can then only be remedied by issuing sudo fusermount -u mnt (root is requred to fix it).
If the drive is attempted by root, I get the message:
mount: according to mtab, [site] is already mounted on [mountpoint]
It does not appear to be present in /etc/mtab, here is my /etc/mtab:
/dev/sda1 /boot/efi vfat rw,noatime,umask=0077 0 0
/dev/sda4 /home ext4 rw,noatime 0 0
binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,noexec,nosuid,nodev 0 0
none /sys/fs/cgroup tmpfs rw,uid=0,gid=0,mode=0755,size=1024 0 0
systemd /sys/fs/cgroup/systemd cgroup rw,noexec,nosuid,nodev,none,name=systemd 0 0
I have also noticed this bug triggered after attempting the sshfs mount:
df -lh
df: ‘/run/user/1000/gvfs’: Transport endpoint is not connected
...
Invoking sshfs with '-o sshfs_debug' simply prints the version number, and no further useful information.
On a system with a working sshfs, I can see fuse entries in the mtab, like a gvfsd-fuse entry listing the username, and successfully mounting the drive will show it in the mtab as well. I've reinstalled sshfs and all of its dependencies several times. I've been wrestling with this issue for days, assistance would be appreciated.
Usually, the filesystem type is returned by this stat
command:
svelte% stat --file-system --format=%T /mnt/
btrfs
But with sshfs
:
svelte% stat --file-system --format=%T /mnt/ravidroid
stat: cannot read file system information for '/mnt/ravidroid': Operation not supported
PID: 26908 (sshfs)
Signal: 11 (SEGV)
Command Line: sshfs [email protected]:/ /home/a/.config/kdeconnect/aac0677204f14494/kdeconnect_sftp/aac0677204f14494 -p 1739 -f -o IdentityFile=/home/a/.config/kdeconnect/privateKey.pem -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o HostKeyAlgorithms=ssh-dss -o password_stdin
Executable: /usr/bin/sshfs
Message: Process 26908 (sshfs) of user 1000 dumped core.
Stack trace of thread 26914:
#0 0x00007ffa07e8b446 strlen (libc.so.6)
#1 0x0000000000404927 n/a (sshfs)
#2 0x00000000004056b5 n/a (sshfs)
#3 0x0000000000407121 n/a (sshfs)
#4 0x00000000004071fe n/a (sshfs)
#5 0x0000000000407e3e n/a (sshfs)
#6 0x000000000040bbcb n/a (sshfs)
#7 0x000000000040ca12 n/a (sshfs)
#8 0x00007ffa088e5cd3 fuse_fs_readdir (libfuse.so.2)
#9 0x00007ffa088e5e0c n/a (libfuse.so.2)
#10 0x00007ffa088ec9c6 n/a (libfuse.so.2)
#11 0x00007ffa088edfc1 n/a (libfuse.so.2)
#12 0x00007ffa088ea768 n/a (libfuse.so.2)
#13 0x00007ffa081b0454 start_thread (libpthread.so.0)
#14 0x00007ffa07ef37df __clone (libc.so.6)
Stack trace of thread 26908:
#0 0x00007ffa081b168d pthread_join (libpthread.so.0)
#1 0x00007ffa088ea9cb fuse_session_loop_mt (libfuse.so.2)
#2 0x00007ffa088f0077 fuse_loop_mt (libfuse.so.2)
#3 0x00000000004036c7 n/a (sshfs)
#4 0x00007ffa07e2b291 __libc_start_main (libc.so.6)
#5 0x0000000000403daa n/a (sshfs)
Refusing to dump core to tty.
If there is anything you need jus tell me
sshfs version: 2.8
Running docker image to serve Plex Media Server with a volume being a mount location that is mounted via Sshfs. The mount is unmounted at random intervals for some reason making the docker container useless. Why would the Sshfs be u mounting without being invoked and how do I keep it mounted. I added it to /etc/fstab but hasn't stopped the random unmounting.
I'm using OSX.
I mounted the wrong folder from the server and want to remove it.
Hi, Need to turn on sshfs debugs, but have them go to a file in background mode. Running below from withing a bash script. What happens is once debugs are turned on, sshfs grabs the console and does not release it, until user does ctrl-c. i.e. the redirect is not working. Please indicate how to do above. Here I ran the command from the csh of the guest and you can see sshfs (fuse) consders 2 to be an invalid argument and does not go to background mode for recording the debugs. (BTW, the /tmp/sshfs.log does get written).
oot@:/etc/rc.d # setfib -F1 sshfs -o StrictHostKeyChecking=no,follow_symlinks,transform_symlinks,no_check_root,Compression=no,LogLevel=debug3,debug 10.0.0.4:/var/foo /var/foo -o intr 2>/tmp/sshfs.log&
[1] 8781
root@:/etc/rc.d # fuse: invalid argument `2'
[1] Exit 1 setfib -F1 sshfs -o StrictHostKeyChecking=no,follow_symlinks,transform_symlinks,no_check_root,Compression=no,LogLevel=debug3,debug 10.0.0.4:/var/foo /var/foo -o intr 2 > /tmp/sshfs.log
Hi,
I found a little bug on sshfs 2.5 on Debian Jessie on amd64 (both server and
client). I copied files from one host to another via sshfs and the date
(mtime) of the copied file was 2106-02-07 instead of 1970-01-01.
If you look at the seconds since epoch, it is +0xffffffff instead of -1.
IMHO sshfs should try to preserve the date information even in edge cases
like this. I assume the bug still exists in the latest version of sshfs.
I have attached a simple shell script to reproduce the bug and a second file
with the output of this script.
Thanks,
9omorra
I typically work on a remote cluster (linux) and sshfs mount a drive on my mac. I then ssh into the remote system and run commands that generate analysis plots that I view locally on my mac. The time between when the file are created on the remote cluster and when they appear in finder for viewing can take any where from 10s of seconds to minutes.
I currently mount via
-o Compression=no,follow_symlinks,auto_cache,reconnect,defer_permissions,noappledouble,volname=foo
Are there any terminal commands on either my client or server that force the sshfs mount to reload/refresh/update the remote filesystem content?
Please answer this question directly without offering other mount options. I'm specifically wanting to find a command that I can run that "forces" the sshfs mount to update. Thanks!
When using UseProxyIf on
MacOS X 10.11.4 with
SSHFS version 2.5 (OSXFUSE SSHFS 2.5.0)
OSXFUSE library version: FUSE 2.7.3 / OSXFUSE 2.8.0
if UseProxyIf is present in the applicable config, independent of whether or not the command succeeds, we get:
ssh_check_need_proxy: waitpid: No child processes
remote host has disconnected
Steps to reproduce:
I am using Macbook, and mount a remote cenos machine.
ls
in terminal, all files displayed immediately but the promote show up after several seconds.scp
this video to local machine it takes less than 5 seconds.Hi, Is there any possibility of installing sshfs and run it as local user without installing as root. If so kindly help me with any URL or documentation for the same.
Suppose I run sshfs
having not yet ssh-add
ed my key. I am then prompted to enter the password for my key. I want to enter my password only once, so I C-c the sshfs
process, run ssh-add
, then re-run sshfs
. I assume that because I haven't given sshfs
my unlocked key, nothing has happened, so the result will be that the second sshfs
invocation mounts the filesystem.
The actual result is that the filesystem is somehow half-mounted. I don't yet fully understand what has happened, but the upshot is that it will not mount until I run fusermount -uz $MOUNTPOINT
(The -z may not be required).
I don't see any reason why beginning the mount before acquiring the key or password or whatever is desirable.
My sshfs is currently crashing when performing a remote mount on a redundant debian system. I'm trying to install sshfs-dbg
and fuse-dbg
to get the debug symbols to hopefully provide useful information on why it's crashing. I ran the apt install command for both packages and they run fine. But when I run file
on sshfs
and libfuse
, it still reports them as "stripped" (which is without debug symbols as I understand it). What am I missing?
FYI it's debian 7 with sshfs version 2.4.1
brew install sshfs
==> Installing sshfs from homebrew/fuse
==> Using the sandbox
==> Downloading https://github.com/libfuse/sshfs/releases/download/sshfs_2.8/sshfs-2.8.tar.gz
==> Downloading from https://github-cloud.s3.amazonaws.com/releases/48388286/836e15ce-386e-11e6-90ab-c0c2376346f3.gz?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAISTNZFOVBIJMK3TQ%2F20170228%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20170228T204207Z&X-Amz-Expir
curl: (22) The requested URL returned error: 500 Internal Server Error
Error: Failed to download resource "sshfs"
Download failed: https://github.com/libfuse/sshfs/releases/download/sshfs_2.8/sshfs-2.8.tar.gz
Hi,
I cant edit files mounted over ssh from a bitvise sever. I tried a lot of combinations of options (uid, giud, idmap, allow_other) and can't get it right.
Is this a bug or config problem?
With transform_symlinks
:
All keys already loaded
(ins)ravi@svelte:~/mnt$ ls -l ravidroid/ext
lrwxrwxrwx 1 root root 19 Apr 1 15:45 ravidroid/ext -> /storage/2EE0-1B07/
(ins)ravi@svelte:~/mnt$
However, follow_symlinks
works:
(ins)ravi@svelte:~/mnt$ sshfs -o follow_symlinks ravidroid: ravidroid
(ins)ravi@svelte:~/mnt$ ls -ld ravidroid/ext
drwxrwx--x 1 root 1015 32,768 Mar 31 13:17 ravidroid/ext
(ins)ravi@svelte:~/mnt$
Should the manpage distinguish transform_symlinks
from follow_symlinks
?
Perhaps the FAQ entry also needs an update.
I'm running arch x64 with a few sshfs mounts.
The shares are mounted with
[email protected]:/data/SomeShare /home/myuser/SomeShare fuse.sshfs nofail,x-systemd.automount,idmap=user,_netdev,identityfile=/home/myuser/.ssh/id_rsa,allow_other,default_permissions,uid=1000,gid=1000,umask=0,reconnect,cache=no,kernel_cache,ciphers=arcfour,compression=no
See here for more info and stuff I've already tried. To me it seems like there is no handling of a connection being dead rather than a mounting issue per se.
When I open a file using standard OS X software (Quicktime Player, Preview, etc.) the files are not properly cached. Opening a second time takes as long as the first time.
If I use a command line tool to read the file (cat file.mp4 > /dev/null) the file is correctly cached. And if I then try to open the file with Quicktime Player, it opens instantly.
This might be explained (I am uncertain) if the standard OS X software uses some alternative to read() to access the files. Perhaps mmap()?
Many thanks in advance.
I'm using git master. Here's the output of sshfs --version
:
SSHFS version 2.8
OSXFUSE 3.5.3
FUSE library version: 2.9.7
fuse: no mount point
I've tried on OSX 10.9.5 and OSX 10.11.6, but I doubt it has anything to do with the OS.
Here are my steps (entering 3 times the wrong password):
$ ./sshfs user@server: ~/mytest
user@server's password:
user@server's password:
user@server's password:
remote host has disconnected
But when I check my mount points:
$ mount
user@server: on /Users/kct/mytest (osxfuse, nodev, nosuid, synchronous, mounted by kct)
Because of this, any subsequent try to mount it again, abends with:
mount_osxfuse: mount point /Users/kct/mytest is itself on a OSXFUSE volume
fuse: failed to mount file system: Invalid argument
Please note:
I also have a very old static version of sshfs (the one that comes with Macfusion, which is sshfs 1.8) and the problem does not occur there.
Hi,
I'm trying to build without root permissions into a local folder. I also have the dependencies and libfuse installed in a local folder. I pass these like this:
./configure --prefix=$HOME/local/path --libdir=$HOME/local/path/lib --bindir=$HOME/local/path/bin --includedir=$HOME/local/path/include
but I always get the error that fuse is not installed.
Is the build environment missing the option for this or am I missing something?
Thanks.
I'm trying to connect to a system where the user names include colons. While ssh and sftp use the whole string before the @ as user name, sshfs stops at the first : and uses the preceding string as host name.
ssh cf:[email protected]
cf:[email protected]'s password:
sshfs cf:[email protected] ~/tmp/sshfs -o sshfs_debug,port=2222,debug
SSHFS version 2.8
FUSE library version: 2.9.4
nullpath_ok: 0
nopath: 0
utime_omit_ok: 0
executing <ssh> <-x> <-a> <-oClearAllForwardings=yes> <-oport=2222> <-2> <cf> <-s> <sftp>
The password stdin option is trying to open up /dev/ptmx rather than using a posix standard call like posix_openpt(). This causes problems on FreeBSD because the /dev/ptmx device is not enabled by default and is considered a legacy compatibility option. While one can manually load the pty compatibility module, it is not quite working as intended.
As posix_openpt is included in both linux and FreeBSD, it makes sense to do this the standard way.
Hi,
With some help from IRC channel ##networking on Freenode it seems there maybe a bug with how sshfs uses fuse. Maybe with 6a2d06e Someone suggested running sshfs with the flag "-o sync_readdir" and it seems to help with the crash I was experiencing. Log of the original crash below.
[raansu@Y40-80 ~]$ sshfs --version
SSHFS version 2.5
FUSE library version: 2.9.5
fusermount version: 2.9.5
using FUSE kernel interface version 7.19
[raansu@Y40-80 ~]$ uname -a
Linux Y40-80 4.4.1-2-ARCH #1 SMP PREEMPT Wed Feb 3 13:12:33 UTC 2016 x86_64 GNU/Linux
[raansu@Y40-80 ~]$
Snippet of following command output is below "gdb --args /usr/bin/sshfs [email protected]:/mnt /mnt -o reconnect,debug -C -o workaround=all"
*** Error in `/usr/bin/sshfs': double free or corruption (fasttop): 0x00007fffe8000900 ***
unique: 94124, opcode: READ (15), nodeid: 4, insize: 80, pid: 20076
read[140736549326944] 4096 bytes from 74526720 flags: 0x8002
read[140736549326944] 4096 bytes from 74526720
unique: 94124, success, outsize: 4112
======= Backtrace: =========
[backtrace without file names and line numbers snipped]
Program received signal SIGABRT, Aborted.
[Switching to Thread 0x7ffff6456700 (LWP 19974)]
0x00007ffff70ff5f8 in raise () from /usr/lib/libc.so.6
(gdb)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.