confusing error message when (S)FTP accounts file has malformed URL #1999

Open
opened 2013-06-07 22:22:35 +00:00 by zooko · 2 comments

A user on IRC was setting up FUSE↔sshfs↔Tahoe-SFTP-server↔LAFS. He connected to the Tahoe-SFTP-server with the "sftp" client, issued the command "ls", and got this error message:

remote readdir("/"): Permission denied

It finally turned out to be that the dir cap in his accounts file had a trailing "/" character on it. Removing that made the error message go away and the SFTP server start working. To close this ticket, make it so that the error message in a case like this gives the user a clue that something is wrong with the cap.

(This might actually be hard to accomplish, if there isn't a way to send back an arbitrary error message in the SFTP protocol in response to the SFTP client's "ls" command.)

A user on IRC was setting up FUSE↔sshfs↔Tahoe-SFTP-server↔LAFS. He connected to the Tahoe-SFTP-server with the "sftp" client, issued the command "ls", and got this error message: ``` remote readdir("/"): Permission denied ``` It finally turned out to be that the dir cap in his accounts file had a trailing "/" character on it. Removing that made the error message go away and the SFTP server start working. To close this ticket, make it so that the error message in a case like this gives the user a clue that something is wrong with the cap. (This might actually be hard to accomplish, if there isn't a way to send back an arbitrary error message in the SFTP protocol in response to the SFTP client's "ls" command.)
zooko added the
code-frontend
normal
defect
1.10.0
labels 2013-06-07 22:22:35 +00:00
zooko added this to the undecided milestone 2013-06-07 22:22:35 +00:00
ClashTheBunny commented 2013-06-08 09:27:13 +00:00
Owner

Why not just handle this in the Tahoe-SFTP server? When would a trailing slash not be good to ignore and just give the user the directory? This isn't an API, this is where we should use heuristics to shield users.

Why not just handle this in the Tahoe-SFTP server? When would a trailing slash not be good to ignore and just give the user the directory? This isn't an API, this is where we should use heuristics to shield users.
Author

Replying to ClashTheBunny:

Why not just handle this in the Tahoe-SFTP server? When would a trailing slash not be good to ignore and just give the user the directory? This isn't an API, this is where we should use heuristics to shield users.

I guess we should have two tickets: one to usefully report malformed caps in the SFTP accounts file, and the other to accept a broader range of plausible caps (e.g. don't mind trailing slashes on dir caps).

Replying to [ClashTheBunny](/tahoe-lafs/trac-2024-07-25/issues/1999#issuecomment-92182): > Why not just handle this in the Tahoe-SFTP server? When would a trailing slash not be good to ignore and just give the user the directory? This isn't an API, this is where we should use heuristics to shield users. I guess we should have two tickets: one to usefully report malformed caps in the SFTP accounts file, and the other to accept a broader range of plausible caps (e.g. don't mind trailing slashes on dir caps).
warner added
code-frontend-ftp-sftp
and removed
code-frontend
labels 2014-12-02 19:50:22 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Reference: tahoe-lafs/trac-2024-07-25#1999
No description provided.