-
Notifications
You must be signed in to change notification settings - Fork 489
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"No such file or directory" when initially creating new file #41
Comments
I'm also having the same issue with CentOS 7. |
Thanks for the report! Could you please clarify if the versions that you gave are for the client or the server (and provide what's not yet specified)? Thanks! |
Thanks for taking a look. The versions are all for the client side (two different clients, Centos 7 and Fedora 25). I don't have access to the problematic server, nor do I know which SFTP implementation the server is using. |
As far as I can tell, the SFTP server returns an ENOENT error message when SSHFS issues a CLOSE request. SSHFS simply forwards that to the user. Short of silently ignoring errors on close (which wouldn't be a good idea), there is thus nothing that SFTP could do differently here. I'm afraid this is a bug in the SFTP server that SSHFS can't work around. |
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:
However, 'foo' is created. Now when I try to touch the same file again, no issues. Similarily:
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/
strace touch (initial, failing):
strace touch (second time, succeeds):
The text was updated successfully, but these errors were encountered: