Mailing List Archive

Virtual FTP Server with Vim
Hi,

I've got the Virtual FTP server up and running, but am having some
strange issues using it with Vim and GVim. I'm wondering if anyone else
has this particular setup working. I'm running Bricolage 2.0.1 on
Ubuntu 10.04 and have tried Vim versions 7.2.330 and 7.3.35.

From my Ubuntu desktop, I can access the FTP server without problem via
Nautilus, FileZilla and the FTP command in a terminal.

I can edit and save files in GVim if I do so by opening them via the
Nautilus file manager. However, I am unable to directly open or browse
for files using Vim's open command (:e). When I try this:

:e ftp://admin@bric\#2121/

...there's a short delay before Vim displays a directory listing which
contains the top-level site directory (Default Site on a default
install). When I try to access this directory, I get the following error:

ftp: connect: Connection refused
Not connected.
Not connected.

Here's the relevant log output, up to the point at which the Vim client
authenticates and produces the first directory listing:

==> log/ftp.log <==
Thu Jun 2 18:05:54 2011 0 192.168.1.1 192 / a _ o r admin ftp 0 * c

==> /var/log/syslog <==
Jun 2 19:05:54 bric ftpd[15707]: starting child process
Jun 2 19:05:54 bric ftpd[15707]: in post accept stage
Jun 2 19:05:54 bric ftpd[15707]: get socket name
Jun 2 19:05:54 bric ftpd[15707]: get peer name
Jun 2 19:05:54 bric ftpd[15707]: archive mode enabled [.bz2, .gz,
.list, .zip]
Jun 2 19:05:54 bric ftpd[15707]: in access control stage
Jun 2 19:05:54 bric ftpd[15707]: in process limits stage
Jun 2 19:05:54 bric ftpd[15707]: connection from 192.168.1.1:56276
Jun 2 19:05:54 bric ftpd[15707]: reply: 220
Jun 2 19:05:54 bric ftpd[15707]: command: (USER, admin)
Jun 2 19:05:54 bric ftpd[15707]: reply: 331
Jun 2 19:05:54 bric ftpd[15707]: command: (PASS, *****)
Jun 2 19:05:54 bric ftpd[15707]: reply: 230
Jun 2 19:05:54 bric ftpd[15707]: command: (SYST, )
Jun 2 19:05:54 bric ftpd[15707]: reply: 215
Jun 2 19:05:54 bric ftpd[15707]: command: (PORT, 192,168,1,1,222,207)
Jun 2 19:05:54 bric ftpd[15707]: reply: 200
Jun 2 19:05:54 bric ftpd[15707]: command: (LIST, -lF)
Jun 2 19:05:54 bric ftpd[15707]: reply: 150
Jun 2 19:05:54 bric ftpd[15707]: reply: 226
Jun 2 19:05:54 bric ftpd[15707]: command: (QUIT, )
Jun 2 19:05:54 bric ftpd[15707]: reply: 221
Jun 2 19:05:54 bric ftpd[15707]: connection terminated normally

It appears as though Vim is disconnecting with "command: (QUIT, )" after
receiving the "Closing data connection" reply (226).

There are no firewalls in the way, and I encounter the same issue if I
run Vim on the Bricolage server.

I assumed that this was just a Vim oddity, but then discovered that it
works correctly with a couple of other FTP servers to which I have
connected.

So it appears to be a compatibility issue between the virtual FTP server
and Vim.


Regards,

Mike
Re: Virtual FTP Server with Vim [ In reply to ]
On Jun 2, 2011, at 11:19 AM, Mike Raynham wrote:

> There are no firewalls in the way, and I encounter the same issue if I run Vim on the Bricolage server.
>
> I assumed that this was just a Vim oddity, but then discovered that it works correctly with a couple of other FTP servers to which I have connected.
>
> So it appears to be a compatibility issue between the virtual FTP server and Vim.

Given that those other FTP clients work, you might want to ask some vim folks about this…

Best,

David
Re: Virtual FTP Server with Vim [ In reply to ]
On Jun 2, 2011, at 11:19 AM, Mike Raynham wrote:

> There are no firewalls in the way, and I encounter the same issue if I run Vim on the Bricolage server.
>
> I assumed that this was just a Vim oddity, but then discovered that it works correctly with a couple of other FTP servers to which I have connected.
>
> So it appears to be a compatibility issue between the virtual FTP server and Vim.

Given that those other FTP clients work, you might want to ask some vim folks about this…

Best,

David
Re: Virtual FTP Server with Vim [ In reply to ]
On 03/06/11 17:32, David E. Wheeler wrote:
> On Jun 2, 2011, at 11:19 AM, Mike Raynham wrote:
>
>> There are no firewalls in the way, and I encounter the same issue if I run Vim on the Bricolage server.
>>
>> I assumed that this was just a Vim oddity, but then discovered that it works correctly with a couple of other FTP servers to which I have connected.
>>
>> So it appears to be a compatibility issue between the virtual FTP server and Vim.
>
> Given that those other FTP clients work, you might want to ask some vim folks about this…

Yes, that was my next step. But as my copy of Vim works with other FTP
servers, so I thought I'd check if any other Bricolage users have
experienced the same problem.

>
> Best,
>
> David
Re: Virtual FTP Server with Vim [ In reply to ]
On Jun 3, 2011, at 9:38 AM, Mike Raynham wrote:

>> Given that those other FTP clients work, you might want to ask some vim folks about this…
>
> Yes, that was my next step. But as my copy of Vim works with other FTP servers, so I thought I'd check if any other Bricolage users have experienced the same problem.

Any vim pros on the list? I'm an Emacs user myself…

Best,

David
Re: Virtual FTP Server with Vim [ In reply to ]
On 03/06/11 17:50, David E. Wheeler wrote:
>
> On Jun 3, 2011, at 9:38 AM, Mike Raynham wrote:
>
>>> Given that those other FTP clients work, you might want to ask some vim folks about this…
>>
>> Yes, that was my next step. But as my copy of Vim works with other FTP servers, so I thought I'd check if any other Bricolage users have experienced the same problem.
>
> Any vim pros on the list? I'm an Emacs user myself…

Emacs? Maybe that's the solution… :-)

>
> Best,
>
> David
>
Re: Virtual FTP Server with Vim [ In reply to ]
On 2011-06-03, at 12:52 PM, Mike Raynham wrote:

> On 03/06/11 17:50, David E. Wheeler wrote:
>>
>> On Jun 3, 2011, at 9:38 AM, Mike Raynham wrote:
>>
>>>> Given that those other FTP clients work, you might want to ask some vim folks about this…
>>>
>>> Yes, that was my next step. But as my copy of Vim works with other FTP servers, so I thought I'd check if any other Bricolage users have experienced the same problem.
>>
>> Any vim pros on the list? I'm an Emacs user myself…
>
> Emacs? Maybe that's the solution… :-)

I'm a Vim user and I use the Virtual FTP server all the time. What's the problem?
Re: Virtual FTP Server with Vim [ In reply to ]
On 07/06/11 22:52, Phillip Smith wrote:
>
> I'm a Vim user and I use the Virtual FTP server all the time. What's the problem?
>

Hi Phillip,

Using Vim I can connect to and browse a variety of FTP sites.

Using FTP clients such as FileZilla and Ubuntu's built-in FTP client, I
can connect to the Bricolage virtual FTP server and browse the template
directory structure.

Using the Nautilus file browser in Ubuntu, I can connect to the virtual
FTP server and open template files in GVim. Once in GVim, I can edit
and save them without problem.

However, I cannot browse the directory or open files directly from
within Vim or GVim (via the :e command). As shown in the debug logs in
my first post, Vim appears to be sending the FTP QUIT command after an
attempt to list files. It doesn't do this when working with other FTP
sites. So the problem appears to be with the specific combination of
Vim and Bricolage virtual FTP server.

Although it's annoying, I can work around it, so it's not a show stopper.


Regards,

Mike