gvfsd-ftp - Pure-FTPd Error: Invalid reply

Bug #208750 reported by Savvas Radevic
28
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gvfs
Fix Released
Medium
gvfs (Ubuntu)
Fix Released
Low
Ubuntu Desktop Bugs
Nominated for Hardy by Savvas Radevic
Nominated for Intrepid by Savvas Radevic

Bug Description

Binary package hint: gvfs-backends

Latest checked version:
$ apt-cache policy gvfs-backends
gvfs-backends:
  Installed: 0.2.3-0ubuntu5
  Candidate: 0.2.3-0ubuntu5

Ubuntu hardy heron 8.04
gvfs ftp backend

Steps to repeat:
1) nautilus ftp://eclipse.sh3lls.net/
2) an error pops up, without a login prompt

Error:
Couldn't display "ftp://eclipse.sh3lls.net/".
Error: Invalid reply
Please select another viewer and try again.

The ftp server uses Pure-FTPd

Related branches

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug report. Are you sure this ftp is working in anonymous? Neither gftp nor lftp is able to connect to it either

Changed in gvfs:
assignee: nobody → desktop-bugs
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Savvas Radevic (medigeek) wrote :

No no, it requires ftp login and password, I just gave an example of a server that uses pure-ftpd.
Try ftp from the terminal

Revision history for this message
Savvas Radevic (medigeek) wrote :

I mean compare:
nautilus ftp://eclipse.sh3lls.net/
and
ftp eclipse.sh3lls.net

nautilus pops up an error, ftp doesn't.

Revision history for this message
Sebastien Bacher (seb128) wrote :

$ lftp ftp://eclipse.sh3lls.net
lftp eclipse.sh3lls.net:~> debug 3
lftp eclipse.sh3lls.net:~> ls
---- Connecting to eclipse.sh3lls.net (66.252.23.2) port 21
<--- 220---------- Welcome to Pure-FTPd [TLS] ----------
<--- 220-You are user number 1 of 50 allowed.
<--- 220-Local time is now 16:50. Server port: 21.
<--- 220-This is a private system - No anonymous login

Revision history for this message
Sebastien Bacher (seb128) wrote :

the ftp doesn't accept anonymous logins

Revision history for this message
Savvas Radevic (medigeek) wrote :

I was about to cross the line here, but now I understand why you're emphasizing on this.
I am not asked for a login info, the error is shown without asking me if I want to login.

Revision history for this message
Savvas Radevic (medigeek) wrote :
Revision history for this message
Savvas Radevic (medigeek) wrote :

$ lftp ftp://<email address hidden>
Password:
lftp <email address hidden>:~> debug 3
lftp <email address hidden>:~> ls
---- Connecting to eclipse.sh3lls.net (66.252.28.2) port 21
<--- 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
<--- 220-You are user number 1 of 50 allowed.
<--- 220-Local time is now 18:25. Server port: 21.
<--- 220-This is a private system - No anonymous login
<--- 220-IPv6 connections are also welcome on this server.
<--- 220 You will be disconnected after 15 minutes of inactivity.
<--- 230-User someuser has group access to: someuser
<--- 230 OK. Current restricted directory is /
drwx--x--x 6 someuser someuser 512 Mar 17 23:23 .
drwx--x--x 6 someuser someuser 512 Mar 17 23:23 ..
-rw------- 1 someuser someuser 6330 Mar 25 14:34 somefile

Revision history for this message
Sebastien Bacher (seb128) wrote :

what version of gvfs do you use? could you run /usr/lib/gvfs -r on a command line and try to connect and note what happens? The authentification dialog is correctly displayed on my hardy installation

Revision history for this message
Savvas Radevic (medigeek) wrote :

That's odd, I tried another server, to my knowledge that uses pure-ftpd, ftp://ftp.greek-fun.com - this one asks me for password.

I have tried what you said on eclipse.sh3lls.net:
$ /usr/lib/gvfs -r
bash: /usr/lib/gvfs: is a directory

$ /usr/lib/gvfs/gvfsd -r
Added new job source 0x642010 (GVfsBackendFtp)
Queued new job 0x643030 (GVfsJobMount)
<-- 220---------- Welcome to Pure-FTPd [privsep] <-- [TLS] ----------
send_reply, failed: 1

Version:
gvfs-backends: 0.2.2-1
gvfs: 0.2.2-1

It looks like I have the same thing on all the servers on *.sh3lls.net, some that I tried: vortex astro dasher eclipse

Revision history for this message
Sebastien Bacher (seb128) wrote :

not confirming, that works correctly on my hardy installation, to send upstream by somebody having the issue

Changed in gvfs:
status: Incomplete → New
Revision history for this message
Savvas Radevic (medigeek) wrote :

Ok let me give some more info:
I have been using hardy since alpha 5, I kept /home partition intact, and formatted the root / partition
I'm using x86_64 / amd64 ubuntu

I've tried to compare the outputs of /usr/lib/gvfs/gvfsd -r:
1) nautilus ftp://<email address hidden>
Added new job source 0x642010 (GVfsBackendFtp)
Queued new job 0x643030 (GVfsJobMount)
<-- 220---------- Welcome to Pure-FTPd [privsep] <-- [TLS] ----------
send_reply, failed: 1

2) nautilus ftp://<email address hidden>
Added new job source 0x642010 (GVfsBackendFtp)
Queued new job 0x643030 (GVfsJobMount)
<-- 220---------- Welcome to Pure-FTPd [TLS] ----<-- ------
send_reply, failed: 1

3) nautilus ftp://<email address hidden>
Added new job source 0x642010 (GVfsBackendFtp)
Queued new job 0x643030 (GVfsJobMount)
<-- 220---------- Welcome to Pure-FTPd [TLS] ----<-- ------
send_reply, failed: 1

4) (the working one) nautilus ftp://<email address hidden>
Added new job source 0x642010 (GVfsBackendFtp)
Queued new job 0x643030 (GVfsJobMount)
<-- 220---------- Welcome to Pure-FTPd [TLS] ----------
<-- 220-You are user number 1 of 50 allowed.
<-- 220-Local time is now 20:22. Server port: 21.
<-- 220-IPv6 connections are also welcome on this server.
<-- 220 You will be disconnected after 15 minutes of inactivity.
(I hit cancel at the login prompt)
send_reply, failed: 1

Revision history for this message
Savvas Radevic (medigeek) wrote :

Now I've compared it in telnet:
$ telnet eclipse.sh3lls.net 21
Trying 66.252.23.2...
Connected to eclipse.sh3lls.net.
Escape character is '^]'.
220---------- Welcome to Pure-FTPd [TLS] ----------
220-You are user number 1 of 50 allowed.
220-Local time is now 17:26. Server port: 21.
220-This is a private system - No anonymous login
220-IPv6 connections are also welcome on this server.
220 You will be disconnected after 15 minutes of inactivity.

$telnet dasher.sh3lls.net 21
Trying 66.252.13.2...
Connected to dasher.sh3lls.net.
Escape character is '^]'.
220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
220-You are user number 1 of 50 allowed.
220-Local time is now 12:26. Server port: 21.
220-This is a private system - No anonymous login
220-IPv6 connections are also welcome on this server.
220 You will be disconnected after 15 minutes of inactivity.

$ telnet astro.sh3lls.net 21
Trying 69.42.213.130...
Connected to astro.sh3lls.net.
Escape character is '^]'.
220---------- Welcome to Pure-FTPd [TLS] ----------
220-You are user number 1 of 50 allowed.
220-Local time is now 17:27. Server port: 21.
220-This is a private system - No anonymous login
220-IPv6 connections are also welcome on this server.
220 You will be disconnected after 15 minutes of inactivity.

See the difference of the last "----<-- ------" or "[privsep] <-- [TLS] ----------"
Looks like their server is broken? Or something in gvfsd parses the banner wrongly?

Revision history for this message
Savvas Radevic (medigeek) wrote :

I've used aptitude purge to completely remove the packages gvfs gvfs-backends libgvfscommon0 nautilus nautilus-data, removed the downloaded copies from /var/cache/apt/archives/ and redownloaded and installed ubuntu-desktop gvfs-backends libgvfscommon0 nautilus nautilus-data (and all the other stuff that came with it). Nothing changed.

Changed in gvfs:
status: New → Triaged
Revision history for this message
figjam (figjam) wrote :

I too have this error.

I have a working ftp server that does not accept anonymous connections.

My system is fully up-to-date with with all the updates @ 22:00 GMT

My server I connect to is ProFTPD 1.3.1 Server running on FreeBSD.

Only nautilus gives the error Invalid reply.

Is there some debugging I can run to check?

Revision history for this message
Savvas Radevic (medigeek) wrote :

Hm.. the sh3lls servers are FreeBSD too. think there's a connection? But as Sebastien mentioned, he didn't get that error, that's what makes it weird.

Revision history for this message
figjam (figjam) wrote :

Interestingly enough, I installed proftpd locally and it works fine.
First is the Ubuntu server, then the BSD one

I used the same daemon version for comparison purposes. No idea what the difference in response is apart from the custom server name.

Still the Ubuntu one works, the BSD one does not.

Connected to localhost.
220 ProFTPD 1.3.1 Server (Debian) [127.0.0.1]
Name (localhost:xxx): xxx
331 Password required for xxx
Password:
230 User xxx logged in
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> bye
221 Goodbye.

Connected to tokra
220 ProFTPD 1.3.1 Server (BSD) [192.168.0.6]
Name (tokra:xxx): xxx
331 Password required for xxx
Password:
230 User xxx logged in
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>

Revision history for this message
figjam (figjam) wrote :

Forgot to add:

If I use Firefox to connect to the BSD server, it all works perfectly to the remote server

-G

Revision history for this message
Savvas Radevic (medigeek) wrote : Re: [Bug 208750] Re: gvfsd-ftp - Pure-FTPd Error: Invalid reply

Try the steps I did:
/usr/lib/gvfs/gvfsd -r
Then open the connection in a new terminal:
nautilus ftp://server.com

Revision history for this message
Savvas Radevic (medigeek) wrote :

...the gvfsd -r should show an output of what's going on

> Try the steps I did:
>
> /usr/lib/gvfs/gvfsd -r
> Then open the connection in a new terminal:
> nautilus ftp://server.com
>

Revision history for this message
Sebastien Bacher (seb128) wrote :

you guys might want to comment upstream rather, they write the code ubuntu only distribute it, they might have a better idea on the issue

Revision history for this message
figjam (figjam) wrote :

OK, I found out something rather interesting.

I saw an anomaly using the -r switch.

IF the server's description text is more than 3 characters, then the reply would fail.

It would appear that the buffer is too small to hold this string.

For verbosity, I have made the reply name 1234567890, then reducing each name as we go on

Here are the results:

<-- <-- 220 ProFTPD 1.3.1 Server (1234567890) [192.16<-- 8.0.6]
send_reply(0x80868b8), failed=1 (Invalid reply)
no more connections left, exiting...Added new job source 0x807a800 (GVfsBackendFtp)
Queued new job 0x807bc18 (GVfsJobMount)
<-- 220 ProFTPD 1.3.1 Server (123456789) [192.168<-- .0.6]
send_reply, failed: 1

Added new job source 0x807a800 (GVfsBackendFtp)
Queued new job 0x807bc18 (GVfsJobMount)
<-- 220 ProFTPD 1.3.1 Server (12345678) [192.168.<-- 0.6]
send_reply, failed: 1

Added new job source 0x807a800 (GVfsBackendFtp)
Queued new job 0x807bc18 (GVfsJobMount)
<-- 220 ProFTPD 1.3.1 Server (1234567) [192.168.0<-- .6]
send_reply, failed: 1

Added new job source 0x807a800 (GVfsBackendFtp)
Queued new job 0x807bc18 (GVfsJobMount)
<-- 220 ProFTPD 1.3.1 Server (123456) [192.168.0.<-- 6]
send_reply, failed: 1

Added new job source 0x807a800 (GVfsBackendFtp)
Queued new job 0x807bc18 (GVfsJobMount)
<-- 220 ProFTPD 1.3.1 Server (12345) [192.168.0.6<-- ]
send_reply, failed: 1

Added new job source 0x807a800 (GVfsBackendFtp)
Queued new job 0x807bc18 (GVfsJobMount)
<-- 220 ProFTPD 1.3.1 Server (1234) [192.168.0.6]<--
send_reply, failed: 1

Added new job source 0x807a800 (GVfsBackendFtp)
Queued new job 0x807bc18 (GVfsJobMount)
<-- 220 ProFTPD 1.3.1 Server (123) [192.168.0.6]
--> USER xxx
<-- 331 Password required for xxx

Revision history for this message
figjam (figjam) wrote :

I must also add in that '/usr/lib/gvfs/gvfsd -r' appears only to be doing something when the connection is to a remote server. Somehow local connections do not create an entry..

Changed in gvfs:
status: Unknown → New
description: updated
Revision history for this message
bassam (bkurdali) wrote :

confirmation report that I seem to have this same bug connecting to my web server via nautilus; command line and firefox work, but nautilus doesn't (I get the invalid reply message). This only happened on Intrepid, on Hardy and previous I didn't have this problem. (my provider is also using pure-ftpd, which is why I think it might be related).
If there are any tests/outputs you would like, let me know what they are and I will post here.

Changed in gvfs:
status: New → Confirmed
Revision history for this message
judsonmitchell (jmitchel-loyno) wrote :

I have the same problem. It only happens on one of my Nautilus bookmarked FTP sites, others are fine. I have three computers running Hardy on two different networks and it only happens on one of them. Here is the response I get.

  ~$ /usr/lib/gvfs/gvfsd -r
Added new job source 0x807a800 (GVfsBackendFtp)
Queued new job 0x807bc18 (GVfsJobMount)
<-- 220 FTP Server ready.<--
send_reply, failed: 1

Revision history for this message
Daniel Bermudez G. (nergar) wrote :

So? no fix yet?

Revision history for this message
Andreas Henriksson (andreas-fatal) wrote :

Daniel: a patch exists in http://bugzilla.gnome.org/show_bug.cgi?id=525283 but noone with an account on the broken servers has yet offered to test it.

Revision history for this message
Sebastien Bacher (seb128) wrote :

could somebody having the issue try the upstream change?

Revision history for this message
Savvas Radevic (medigeek) wrote :

Andreas' fix committed upstream!!

        reviewed by: Andreas Henriksson <email address hidden>

        Bug 525283 - handle short reads in ftp

        * daemon/gvfsbackendftp.c: (ftp_connection_receive):
        account for cases where soup_socket_read_until() would not read up to
        the boundary on the first read.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gvfs - 1.1.7-0ubuntu1

---------------
gvfs (1.1.7-0ubuntu1) jaunty; urgency=low

  * New upstream version:
    - Fix build on some platforms
    - ftp: Fix short read errors (lp: #208750)
    - gphoto2: Make it work on iphone
    - sftp: Fix symlink creation
    - fuse: Better support of truncation, fixing OOo save (lp: #317587)
    - proxy monitors: Support mount operations, etc
    - gvfs-mount: add --device commandline support
    - sftp: Fix protocol bug that made some servers not work (lp: #286053)
    - general support for query_info over streams, implemented for smb, sftp
    - Initial support for .xdg-volume-info reading (lp: #269159)
    - fix trash crasher (lp: #332554)
    - use ssh config (lp: #264803)
  * debian/patches/02_support_xdg_volume_info.patch:
    - the new version fixes this issue
  * debian/patches/91_upstream_change_fix_trash_crasher.patch:
    - upstream change to fix a trash crasher (lp: #333791)
  * debian/rules:
    - shlibs version update

 -- Sebastien Bacher <email address hidden> Mon, 02 Mar 2009 18:10:40 +0100

Changed in gvfs:
status: Triaged → Fix Released
Changed in gvfs:
status: Confirmed → Fix Released
Changed in gvfs:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.