Go Premium for a chance to win a PS4. Enter to Win


ftp auto-fetching syntax in SuSE 9.0 Professional

Posted on 2004-08-26
Medium Priority
Last Modified: 2013-12-15
I'm using SuSE 9.0 Professional and am trying to set up a transfer script, u
sing the auto-fetching feature of ftp.  I've printed the "man" pages for ftp
 and have tried every combination that I can think of for the systax.  Howev
er, I am never able to connect and transfer my files.

Let's say that I want to transfer all of my host files in /tmp to my client.
  My host is and I'm logging into the system as root.  Accordi
ng to the man pages, the command would be:

ftp://root:password@ /tmp/*

I continue to get the message, "No such file or directory."

If I enter the commands manually, everything works correctly.

Any help with this would be appreciated.

Question by:ggs54
  • 2
LVL 40

Accepted Solution

jlevie earned 1000 total points
ID: 11908809
I think SuSE 9.0 includes the ncftp package and using it would be the easiest way of doing this in a script. The script might contain:

cd /tmp
ncftpput [-R] -u root -p password /path-to/server-files *

which would transfer all files in /tmp on the local machine to /path-to/server-files on Note that you'd need the -R option if you have directories that need to be transferred.

Also note that the FTP server on must be configured to allow root to login to FTP, which is something that most FTP servers disallow for security reasons. You'll have to reconfigure that FTP server to allow that, or better (for security reasons) use an ordinary user account for the FTP transfer.

It would also be possible (and safer) to use scp and pre-shared keys to do this within a script. With a public key generated on the server (by executing ssh-keygen) and transfered to ~root/authorized_keys you could do:

cd /tmp
scp [-r] *

See 'man ssh-keygen' and 'man scp' for details.

Author Comment

ID: 11909585
Thanks.  I'll check to see if SuSE has the ncftp package.  I'm actually transferring files the other way, from an HP-UX host to the client pc.  My HP-UX machine does allow root to log in and use ftp.  The files being transferred are all of my database files, all of which are owned by root, as well as programs, etc.  Basically, I'm setting up a Linux pc in another building and want to transfer all of these files automatically each night.  Just one more method of backup to guard against catastrophic failure i.e. if our building burns down, we have a backup on another machine in another building.

I'll let you know if I have the ncftp package and how it works.

Thanks for your response.


Author Comment

ID: 11915764
Thanks.  I downloaded the current version of ncftp and it works exactly as needed.  I appreciate your help.


Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

876 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question