1

I have to create a specific directory structure on an anonymous FTP server. These directories will contain some metadata files that will be read from a bot of a specific service (...but this is not important now).

The important thing (these are basics requirements for the bot to be able to read the metadata files) are:

1) Directory listings must be enabled, the so-called -Lrat switch

2) Also, they should be configured to generate Unix style directory listings

I have no access to the FTP configuration and I have received the access from an IT but I am not sure that who gave me access has followed the previous configuration. Can I see it in some way? (looking at the server directory structure or in some other way)

Joseph Quinsey
  • 222
  • 6
  • 17
AndreaNobili
  • 177
  • 1
  • 5

1 Answers1

2

You can verify these things very easily using a command line FTP client (or any ftp client for the first one). Under Linux you will have one built in, windows probably too but I'm not in a position to check right now.

Simply run ftp user@server and give your password when prompted. Once logged in give the list command and if you get something useful back directory listing is enabled. The format of that listing will answer the other question - just compare it to a Unix style listing as seen in the output from ls -l under Linux/osx/... (if you don't have access to a box running some Unix-a-like OS in order to check this, you'll fine many examples online)

In fact that switch looks like options for the ls command rather than for the ftp server to enable listing generally - many ftp severs running on Unix-like OSs will pass an ls command through to the underlying OS. I suspect that l should be lowercase in which case it turns on the long (detailed) listing format, the a tells it not to skip over "dot files" which it normally doesn't display, and the t and r options ask for sorting of the output in reverse order of the file last-modification timestamps (the default is to output in alphabetic order by name). If this is what is actually being required, login yachting the command line client and issue the command ls -lrat to see if you don't get an invalid command error and if the output is in the expected format.

David Spillett
  • 22,534
  • 42
  • 66
  • Thank you but I am not sure to have well understand what are you saying to me. I have done the following step: 1) I entered into FTP account with my credential (using ftp command in my bash) 2) I entered in the directory that I have to check (using cd command) 3) now I tryed to execute the list command but I obtain this error message: ftp> list ?Invalid command What it mean? – AndreaNobili Sep 22 '13 at 21:05
  • And if I execute ls -lrat I obtain this:ftp> ls -lrat 200 PORT command successful. 150 Opening ASCII mode data connection for /bin/ls. 09-21-13 07:50PM RePEc 226 Transfer complete. – AndreaNobili Sep 22 '13 at 21:13
  • So what it mean? that this is not unix style? – AndreaNobili Sep 22 '13 at 21:13