SFTP: FileZilla doesn't show subdirectories #1337

Closed
opened 2011-01-25 21:36:21 +00:00 by davidsarah · 7 comments
davidsarah commented 2011-01-25 21:36:21 +00:00
Owner

Reported by Matt Drollette on #tahoe-lafs :

  • FileZilla can create directories and files via the SFTP frontend, but subdirectories do not show up in listings
  • there are no errors; the subdirectories are just omitted
  • mutable and immutable files do show up
  • browsing to the path of a new directory does show the files contained in it
  • with the same setup, "Places -> connect to server" in Gnome worked correctly (I believe this uses GIO/gvfs)
  • waiting and refreshing the directory listing, or restarting FileZilla, does not help (so probably not the same issue as #1061).

This probably has something to do with the format of entries for subdirectories in a directory listing not being as FileZilla expects. We should try to make it as close as possible to something that all clients test against, like openssh.

Reported by Matt Drollette on #tahoe-lafs : * [FileZilla](wiki/FileZilla) can create directories and files via the SFTP frontend, but subdirectories do not show up in listings * there are no errors; the subdirectories are just omitted * mutable and immutable files do show up * browsing to the path of a new directory does show the files contained in it * with the same setup, "Places -> connect to server" in Gnome worked correctly (I believe this uses GIO/gvfs) * waiting and refreshing the directory listing, or restarting [FileZilla](wiki/FileZilla), does not help (so probably not the same issue as #1061). This probably has something to do with the format of entries for subdirectories in a directory listing not being as [FileZilla](wiki/FileZilla) expects. We should try to make it as close as possible to something that all clients test against, like openssh.
tahoe-lafs added the
code-frontend
major
defect
1.8.1
labels 2011-01-25 21:36:21 +00:00
tahoe-lafs added this to the undecided milestone 2011-01-25 21:36:21 +00:00
davidsarah commented 2011-01-26 00:49:13 +00:00
Author
Owner

davidsarah: hmm, I have an idea what might be confusing filezilla

davidsarah: stop the gateway, then edit src/allmydata/frontends/sftpd.py

davidsarah: line 145 currently says 'st_size = attrs.get("size", "?")'

davidsarah: change it to 'st_size = attrs.get("size", 0)'

davidsarah: then restart the gateway and test it again

MattDrollette: ha wow that did it

MattDrollette: works fine now

davidsarah: hmm, I have an idea what might be confusing filezilla davidsarah: stop the gateway, then edit src/allmydata/frontends/sftpd.py davidsarah: line 145 currently says 'st_size = attrs.get("size", "?")' davidsarah: change it to 'st_size = attrs.get("size", 0)' davidsarah: then restart the gateway and test it again MattDrollette: ha wow that did it MattDrollette: works fine now
tahoe-lafs modified the milestone from undecided to 1.9.0 2011-01-26 00:49:13 +00:00
davidsarah commented 2011-01-28 06:55:39 +00:00
Author
Owner

Attachment fix-1337.darcs.patch (29997 bytes) added

SFTP: report unknown sizes as "0" instead of "?", to satisfy some clients. fixes #1337

**Attachment** fix-1337.darcs.patch (29997 bytes) added SFTP: report unknown sizes as "0" instead of "?", to satisfy some clients. fixes #1337
davidsarah commented 2011-01-28 07:07:17 +00:00
Author
Owner

Attachment alternative-fix-1337.darcs.patch (29960 bytes) added

SFTP: report unknown sizes as "0" instead of "?", to satisfy some clients, but only for directories rather than all objects. fixes #1337

**Attachment** alternative-fix-1337.darcs.patch (29960 bytes) added SFTP: report unknown sizes as "0" instead of "?", to satisfy some clients, but only for directories rather than all objects. fixes #1337
davidsarah commented 2011-01-28 07:15:59 +00:00
Author
Owner

MattDrollette: can you test whether alternative-fix-1337.darcs.patch is sufficient to fix this for FileZilla? I'd prefer to keep on showing unknown file sizes as '?' if FileZilla will tolerate that.

To test the patch, save the attachment and do:

darcs get --lazy http://tahoe-lafs.org/source/tahoe-lafs/trunk test1337
cd test1337
darcs apply alternative-fix-1337.darcs.patch
python setup.py build

and then test whether FileZilla can see both files and directories, including mutable files.

MattDrollette: can you test whether [alternative-fix-1337.darcs.patch](http://tahoe-lafs.org/trac/tahoe-lafs/raw-attachment/ticket/1337/alternative-fix-1337.darcs.patch) is sufficient to fix this for FileZilla? I'd prefer to keep on showing unknown **file** sizes as '?' if FileZilla will tolerate that. To test the patch, save the attachment and do: ``` darcs get --lazy http://tahoe-lafs.org/source/tahoe-lafs/trunk test1337 cd test1337 darcs apply alternative-fix-1337.darcs.patch python setup.py build ``` and then test whether FileZilla can see both files and directories, including mutable files.
davidsarah commented 2011-01-30 06:34:05 +00:00
Author
Owner

I tested alternative-fix-1337.darcs.patch myself in FileZilla, and it did not allow mutable files to be listed. fix-1337.darcs.patch worked perfectly, modulo showing mutable file sizes as 0. So we should apply the latter.

It's up to Brian whether we apply it for 1.8.2. It does include tests (the existing tests were sufficient, they just needed to be changed to expect 0).

I tested [alternative-fix-1337.darcs.patch](/tahoe-lafs/trac-2024-07-25/attachments/000078ac-77ba-9cd9-15c8-88b7b5dbf859) myself in [FileZilla](wiki/FileZilla), and it did not allow mutable files to be listed. [fix-1337.darcs.patch](/tahoe-lafs/trac-2024-07-25/attachments/000078ac-77ba-9cd9-15c8-856c02c3afa7) worked perfectly, modulo showing mutable file sizes as 0. So we should apply the latter. It's up to Brian whether we apply it for 1.8.2. It does include tests (the existing tests were sufficient, they just needed to be changed to expect 0).

it's awfully late for 1.8.2, but we can't think of how we'd improve upon this change if we had more time to work on it, and I think the chance of breakage is low, so I'm accepting this for 1.8.2

patch looks good to me

it's awfully late for 1.8.2, but we can't think of how we'd improve upon this change if we had more time to work on it, and I think the chance of breakage is low, so I'm accepting this for 1.8.2 patch looks good to me
warner modified the milestone from 1.9.0 to 1.8.2 2011-01-31 01:13:23 +00:00
david-sarah@jacaranda.org commented 2011-01-31 01:20:36 +00:00
Author
Owner

In changeset:ed67df866cce3b6a:

SFTP: report unknown sizes as "0" instead of "?", to satisfy some clients. fixes #1337
In changeset:ed67df866cce3b6a: ``` SFTP: report unknown sizes as "0" instead of "?", to satisfy some clients. fixes #1337 ```
tahoe-lafs added the
fixed
label 2011-01-31 01:20:36 +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#1337
No description provided.