SFTP interface not working over sshfs on OS X #1040
Labels
No Label
0.2.0
0.3.0
0.4.0
0.5.0
0.5.1
0.6.0
0.6.1
0.7.0
0.8.0
0.9.0
1.0.0
1.1.0
1.10.0
1.10.1
1.10.2
1.10a2
1.11.0
1.12.0
1.12.1
1.13.0
1.14.0
1.15.0
1.15.1
1.2.0
1.3.0
1.4.1
1.5.0
1.6.0
1.6.1
1.7.0
1.7.1
1.7β
1.8.0
1.8.1
1.8.2
1.8.3
1.8β
1.9.0
1.9.0-s3branch
1.9.0a1
1.9.0a2
1.9.0b1
1.9.1
1.9.2
1.9.2a1
LeastAuthority.com automation
blocker
cannot reproduce
cloud-branch
code
code-dirnodes
code-encoding
code-frontend
code-frontend-cli
code-frontend-ftp-sftp
code-frontend-magic-folder
code-frontend-web
code-mutable
code-network
code-nodeadmin
code-peerselection
code-storage
contrib
critical
defect
dev-infrastructure
documentation
duplicate
enhancement
fixed
invalid
major
minor
n/a
normal
operational
packaging
somebody else's problem
supercritical
task
trivial
unknown
was already fixed
website
wontfix
worksforme
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Reference: tahoe-lafs/trac-2024-07-25#1040
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Using SFTP interface on OS X (10.5.8) raises following exception:
exceptions.TypeError: ('Could not adapt', <allmydata.frontends.sftpd.SFTPUser instance at 0x27e34e0>, <InterfaceClass twisted.conch.interfaces.ISession>)
The problem occurs with ExpanDrive and Transmit. Connecting with
sshfs
command worked, but only if it was issued as root - in that case other users can't access the mounted disk.You can see the full log for sftp, sshfs, and Transmit.
I've made SFTPUser implement ISession (the interface that the logs showed it as failing to be adapted to), which should either fix this problem or allow it to get slightly further. Please 'darcs pull' on the ticket1037 branch and try again.
Replying to davidsarah:
source:src/allmydata/frontents/sftpd.py was missing
from allmydata.util import log
andself
on line 1247.Unfortunately it didn't fix the problem, the only exception it now reports is
exceptions.NotImplementedError
.Only new thing I noticed in [http://gist.github.com/402203 log] is
executing command "df -P -k /"
.I've noticed some weird behaviour too: Finder manages to create .Trashes directory and .DS_Store file on the server, but dragging a new file to the disk creates an empty file on the server. Now, even weirder thing is that dragging files into Transmit (for which I suspect is using sshfs internally) uploads the files correctly but it can't list directories, just like Finder.
Replying to [josipl]comment:3:
The ticket1037 branch now attempts to fake the output of this command (but I've had to make some guesses about how to implement execCommand since the Twisted documentation is very sparse). Please pull and try again.
This is an independent problem -- probably the same one mentioned in /tahoe-lafs/trac-2024-07-25/issues/6099#comment:5. The file is empty because the handle is opened with FXF_EXCL (equivalent to POSIX O_EXCL) in the flags, which means that we have to create a zero-length file first. Then the 'close' hangs and the zero-length file is left in place.
Perhaps it only depends on the 'df' command when showing a directory listing (which would make sense if the listing shows the free space on the disk).
Unfortunately, the problem is still there. Sometimes, a file or two get shown in Finder but that's it. From the log I'd say that the connection is dropped too early. Now this exception is being raised all the time:
exceptions.AttributeError: 'NoneType' object has no attribute 'write'
David-Sarah think that this issue has been fixed in their branch. Here are their instructions for testing the branch:
http://tahoe-lafs.org/pipermail/tahoe-dev/2010-May/004339.html
Replying to zooko:
Unfortunately not even the latest patches fixed the problem (there was a missing
write
method onFakeTransport
).According to log no exceptions are raised, yet nothing shows up in Finder.
Please
darcs revert
thendarcs pull
again. The problem appears to have been due to sshfs refusing to operate on files and directories that are not world-readable (or world-writeable for writing). sshfs arguably shouldn't have been doing that, but in any case, the current branch now reports the permissions needed for it to work.(Thanks to josipl and francois for help with debugging this.)