Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have to download a whole subtree of directories and files from an ftp server to my own local pc (Ubuntu). Normally a GUI like gFTP or Filezilla would do the trick, but on this ftp server I have to authenticate myself with a site group [user] and site gpass [password] command.

When using the tool ftp I can only download the files of one directory (mget) at a time, not a whole subtree.

How can I do this. I would not like to install any software that is not in the Ubuntu repositories.

share|improve this question
    
Are you saying that the problem is just that you need to authenticate with a username and password? –  Andy Jul 15 '10 at 8:25
    
@Andy Part of the problem. This server works like this and I cannot change it. Filezilla et al. are seemingly not supporting to always executing this command for every connection, making it possible to browse the ftp (because for that I can give custom commands), but not to download (because it makes a new connection without the commands) –  Peter Smit Jul 15 '10 at 8:35
2  
OK so you want an application that allows you to execute custom commands at the start of every connection? –  Andy Jul 15 '10 at 8:47
    
@Andy: Yes, indeed. So your answer did the trick :) ! –  Peter Smit Jul 15 '10 at 10:10

3 Answers 3

up vote 2 down vote accepted

Using Filezilla, you can try this, taken from the Filezilla forums.

Q:

It should be possible to configure one or more custom commands to be executed after connect (like setting the initial default remote directory).

A sample use case is connecting to an iSeries (AS/400): Depending on the configuration of the FTP server you have to issue the custom command "SITE NAMEFMT 1" before transferring files.

A:

There is an undocumented feature: PostLoginCommands.

Code:

<PostLoginCommands>
<Command>command1</Command>
<Command>command2</Command>
<Command>command3</Command>
.
.
.
</PostLoginCommands>

Must be entered directly into the <server> block in sitemanager.xml.

Not tested, but I think that's the right kind of thing for you?

share|improve this answer
    
This is great! Thanks! –  Peter Smit Jul 15 '10 at 9:36
    
Glad it worked. –  Andy Jul 15 '10 at 10:19

Try using wget instead. Something like this:

wget -m ftp://username:password@host/folder/

See Using wget to recursively download whole FTP directories.

share|improve this answer
    
How about the site group and site gpass commmands? It seems wget can not handle this! –  Peter Smit Jul 15 '10 at 9:33
    
Don't even know what that is :p Sorry! –  Svish Jul 15 '10 at 17:52

ftp has no recursive, I suggest tar the directory first.

share|improve this answer
    
I know that ftp has no recursive (I mentioned that). I cannot tar the directory first, because it is on a remote ftp server where I have only read ftp access to. –  Peter Smit Jul 15 '10 at 8:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.