Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to use folder other than /home/ftp with wget ?

Status
Not open for further replies.

NewtownGuy

Technical User
Jul 27, 2007
146
US
I'm running Ubuntu Server 10.04. The ###!!! documentation for wget neglects to mention that paths on the server are relative to /home/ftp. So when you try to wget filename.txt from ftp://1.2.3.4/filename.txt, it is really coming from ftp://1.2.3.4/home/ftp/filename.txt. I wasted hours trying to find out why I kept getting error messages that the folder I requested was not present.

How do I configure wget to really use the path that I specify, without /home/ftp ? I looked in /etc/wgetrc but I did not see anything about it.

--

 
the true server path for "/" on an ftp server is specified in the server setup. Everything you refer to as "/" is relative to the ftp server's root path, not the true root path of the system.

It would be a major security breach, and very foolish to set the ftp server's home path to "/". That's just asking hackers to trash your system.

By default, it's going to be /home/ftp. you can create another branch if you want, perhaps /ftpserver. but everything on ftp will refer to that path.

The easiest thing to do is create the appropriate "/home/ftp" and then "chmod 777 /home/ftp". Everything to/from ftp will be in or under that folder.

And when you get an error message that a folder is not present, follow up on the error message. I just googled "/home/ftp folder" and found 23,000,000+ results. The first couple were enough to explain it. And if you don't understand a term like "chroot jail", you need to find out what that is. It's REALLY important.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top