#1337 closed defect (fixed)

SFTP: FileZilla doesn't show subdirectories

Reported by: davidsarah Owned by: warner
Priority: major Milestone: 1.8.2
Component: code-frontend Version: 1.8.1
Keywords: sftp FileZilla reviewed Cc:
Launchpad Bug:

Description

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.

Attachments (2)

fix-1337.darcs.patch (29.3 KB) - added by davidsarah at 2011-01-28T06:55:39Z.
SFTP: report unknown sizes as "0" instead of "?", to satisfy some clients. fixes #1337
alternative-fix-1337.darcs.patch (29.3 KB) - added by davidsarah at 2011-01-28T07:07:17Z.
SFTP: report unknown sizes as "0" instead of "?", to satisfy some clients, but only for directories rather than all objects. fixes #1337

Download all attachments as: .zip

Change History (7)

comment:1 Changed at 2011-01-26T00:49:13Z by davidsarah

  • Milestone changed from undecided to 1.9.0
  • Owner set to davidsarah
  • Status changed from new to assigned

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

Changed at 2011-01-28T06:55:39Z by davidsarah

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

Changed at 2011-01-28T07:07:17Z by davidsarah

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

comment:2 Changed at 2011-01-28T07:15:59Z by davidsarah

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.

comment:3 Changed at 2011-01-30T06:34:05Z by davidsarah

  • Keywords review-needed added
  • Owner changed from davidsarah to warner
  • Status changed from assigned to new

I tested attachment:alternative-fix-1337.darcs.patch myself in FileZilla?, and it did not allow mutable files to be listed. attachment: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).

comment:4 Changed at 2011-01-31T01:13:23Z by warner

  • Keywords reviewed added; review-needed removed
  • Milestone changed from 1.9.0 to 1.8.2

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

comment:5 Changed at 2011-01-31T01:20:36Z by david-sarah@…

  • Resolution set to fixed
  • Status changed from new to closed

In ed67df866cce3b6a:

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

Note: See TracTickets for help on using tickets.