unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* FTP to MS ftp server
@ 2013-04-03  7:42 Guido Van Hoecke
  2013-04-03  9:33 ` Yuri Khan
  0 siblings, 1 reply; 5+ messages in thread
From: Guido Van Hoecke @ 2013-04-03  7:42 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

It is regrettable that the ftp directory listing of MS ftp servers often
use the MS-DOS directory listing format rather than the standard unix
format.

It is much worse that Emacs does not understand that format. PathFinder
as well as ForkLift grok that format, so does FileZilla, FireFTP, Total
Commander and probably many others.

There must be other Emacs users that need to access such ftp sites. How
do they handle this? I really would like to access them from within
Emacs.

Is there any chance to see this 'translation layer' implemented by
Emacs?


Guido

--
Dad always thought laughter was the best medicine, which I guess is why
several of us died of tuberculosis.
		-- Jack Handey

http://vanhoecke.org ... and go2 places!



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: FTP to MS ftp server
  2013-04-03  7:42 FTP to MS ftp server Guido Van Hoecke
@ 2013-04-03  9:33 ` Yuri Khan
  2013-04-03 15:54   ` Guido Van Hoecke
  0 siblings, 1 reply; 5+ messages in thread
From: Yuri Khan @ 2013-04-03  9:33 UTC (permalink / raw)
  To: Guido Van Hoecke; +Cc: help-gnu-emacs

On Wed, Apr 3, 2013 at 2:42 PM, Guido Van Hoecke <guivho@gmail.com> wrote:

> It is regrettable that the ftp directory listing of MS ftp servers often
> use the MS-DOS directory listing format rather than the standard unix
> format.

What is regrettable is that the FTP protocol did not *have* a standard
listing format until it was too late. At the time FTP was invented
(RFC 765, published in 1980), no one had thought that 30 years later
people will want to access FTP servers with any client programs other
than Telnet and the interactive command-line FTP client.

The LIST command in the protocol is not required to adhere to any
particular format; it is meant for human user consumption and it is
expected that users will be able to read any reasonable format. RFC
3659, published in 2007, adds the MLSD command which does specify a
machine-readable format.

The questions, then, are: whether the server you are interested in
does in fact implement RFC 3659, and whether Emacs can use MLSD
instead of LIST in order to fetch listings.

You might also see if you can migrate to a different protocol, such as
SFTP (SSH File Transfer Protocol, not Simple File Transfer Protocol;
unlikely on a Windows server), or WebDAV, or god-forbid CIFS (also
sometimes known as SMB), all of which are better suited for file
collection browsing than FTP.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: FTP to MS ftp server
  2013-04-03  9:33 ` Yuri Khan
@ 2013-04-03 15:54   ` Guido Van Hoecke
  2013-04-04  6:20     ` Yuri Khan
  0 siblings, 1 reply; 5+ messages in thread
From: Guido Van Hoecke @ 2013-04-03 15:54 UTC (permalink / raw)
  To: Yuri Khan; +Cc: help-gnu-emacs

Yuri Khan <yuri.v.khan@gmail.com> writes:

> On Wed, Apr 3, 2013 at 2:42 PM, Guido Van Hoecke <guivho@gmail.com> wrote:
>
>> It is regrettable that the ftp directory listing of MS ftp servers often
>> use the MS-DOS directory listing format rather than the standard unix
>> format.
>
> What is regrettable is that the FTP protocol did not *have* a standard
> listing format until it was too late. At the time FTP was invented
> (RFC 765, published in 1980), no one had thought that 30 years later
> people will want to access FTP servers with any client programs other
> than Telnet and the interactive command-line FTP client.

As far as I know, there's only one MS-DOS format, and luckily, it is
occurring less frequently that the UNIX format. Microsoft explains how
users of their servers can choose either format:
http://www.iis.net/configreference/system.applicationhost/sites/sitedefaults/ftpserver/directorybrowse

So again, I would be happy if Emacs would grok this MS-DOS format.

> The LIST command in the protocol is not required to adhere to any
> particular format; it is meant for human user consumption and it is
> expected that users will be able to read any reasonable format. RFC
> 3659, published in 2007, adds the MLSD command which does specify a
> machine-readable format.
>
> The questions, then, are: whether the server you are interested in
> does in fact implement RFC 3659, and whether Emacs can use MLSD

I have no idea about nor control over this capability of those servers.

> instead of LIST in order to fetch listings.
>
> You might also see if you can migrate to a different protocol, such as
> SFTP (SSH File Transfer Protocol, not Simple File Transfer Protocol;
> unlikely on a Windows server), or WebDAV, or god-forbid CIFS (also
> sometimes known as SMB), all of which are better suited for file
> collection browsing than FTP.

Again, I can only use what the servers provide as standard interface,
i.e. plain old FTP, unfortunately using MS-DOS format, and I would like
to access these servers from within Emacs.


Respectfully,


Guido

--
Cops never say good-bye.  They're always hoping to see you again in the
line-up.
		-- Raymond Chandler

http://vanhoecke.org ... and go2 places!



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: FTP to MS ftp server
  2013-04-03 15:54   ` Guido Van Hoecke
@ 2013-04-04  6:20     ` Yuri Khan
  2013-04-04  9:09       ` Michael Albinus
  0 siblings, 1 reply; 5+ messages in thread
From: Yuri Khan @ 2013-04-04  6:20 UTC (permalink / raw)
  To: Guido Van Hoecke; +Cc: help-gnu-emacs

On Wed, Apr 3, 2013 at 10:54 PM, Guido Van Hoecke <guivho@gmail.com> wrote:

> As far as I know, there's only one MS-DOS format, and luckily, it is
> occurring less frequently that the UNIX format.

There is not only one DOS format. DOS versions earlier than Windows 95
had no notion of long file names, and so their listings displayed the
file names in the leftmost column; with long file names, the file
names moved to the right.

Also, the sizes come separated with the locale-specific thousand (or,
rather, digit group) separator, which can vary considerably. The dates
and times are formatted in the locale-specific formats, with their
associated component orders, digit counts and separators. In the case
of Windows, the locale that is used is most often the one that the
system was initially installed with; it bears strong correlation with
the country of deployment because of pricing policies.

UNIX listings also have these locale-related problems, with an added
twist that the UNIX listing sometimes conserves space by showing
either modification time or the modification year.

This variability is what makes human-oriented listings ultimately
unparseable in the general case.

> Microsoft explains how
> users of their servers can choose either format:
> http://www.iis.net/configreference/system.applicationhost/sites/sitedefaults/ftpserver/directorybrowse

So have you tried convincing the administrators of servers you need to
work with to switch to the UNIX format?

> So again, I would be happy if Emacs would grok this MS-DOS format.

I am not very well versed in Emacs’s implementation of FTP; a cursory
reading suggests that it is handled by the ange-ftp module which has
code to deal with VMS, MTS, CMS and BS2000 listings. You might be able
to implement DOS listing parsing (or have it implemented for you) by
following those as examples. In case you are not doing it yourself,
you will need to provide the implementor with access to a suitable
server.

(I certainly won’t undertake such a task, as it’s my deep belief that
parsing human-readable FTP listings is a dirty hack and the only
proper way is to use the MLSD command and persuade everybody to
replace their old servers with those that implement MLSD. Better yet,
drop FTP altogether in favor of a protocol originally designed for
machines, not humans.)



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: FTP to MS ftp server
  2013-04-04  6:20     ` Yuri Khan
@ 2013-04-04  9:09       ` Michael Albinus
  0 siblings, 0 replies; 5+ messages in thread
From: Michael Albinus @ 2013-04-04  9:09 UTC (permalink / raw)
  To: Yuri Khan; +Cc: help-gnu-emacs

Yuri Khan <yuri.v.khan@gmail.com> writes:

> On Wed, Apr 3, 2013 at 10:54 PM, Guido Van Hoecke <guivho@gmail.com> wrote:
>
>> So again, I would be happy if Emacs would grok this MS-DOS format.
>
> I am not very well versed in Emacs’s implementation of FTP; a cursory
> reading suggests that it is handled by the ange-ftp module which has
> code to deal with VMS, MTS, CMS and BS2000 listings. You might be able
> to implement DOS listing parsing (or have it implemented for you) by
> following those as examples. In case you are not doing it yourself,
> you will need to provide the implementor with access to a suitable
> server.

Given, that ftp access to remote servers has not the importance any
longer as in the past, I fear that the Emacs maintainers are not too
enthusiastic writing such an ange-ftp backend. Neither for DOS format
nor for MLSD format (but the latter could attract a little bit more).
Patches from somebody else are welcome, of course.

Best regards, Michael.



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-04-04  9:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-03  7:42 FTP to MS ftp server Guido Van Hoecke
2013-04-03  9:33 ` Yuri Khan
2013-04-03 15:54   ` Guido Van Hoecke
2013-04-04  6:20     ` Yuri Khan
2013-04-04  9:09       ` Michael Albinus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).