[lug] wget question

Jim Buzbee James.Buzbee at echostar.com
Mon Jun 3 12:42:13 MDT 2002


D. Stimits wrote:

...

>>
>>I don't think it's a chroot issue because manual ftp works fine. If the
>>ftp daemon were running in a chroot jail, I wouldn't be able to do "cd
>>.." "get README" successfully. I wonder if wget is trying to do some
>>security restrictions on its own. Here's the output I see :
> 
> 
> You can always do "cd ..", it is a defined interface command. The
> difference between the root and subdirectories is that "cd .." from root
> is defined to return the current directory, instead of a parent.

Yes, but in my case "cd .." from an interactive ftp session really 
works. I can see and fetch files one directory level above the home 
directory for "user".

...

> 
> If you place a file in the parent to the home directory, and use "..",
> it will fail (at least my wget does). However, I think the trick you are
> looking for is to use absolute path, which under wget requires a double
> forward slash at the front of the path, "//":
>   wget -O - ftp://user:mypasswd@machine1//Some/Absolute/Path/README


I've played with absolute paths and find that they work for directories 
other than the real "/" which is where my un-fetchable file exists.  For 
example, if I put my file in "/tmp" I can reach it via :

wget -O - ftp://user:mypasswd@machine1//tmp/README

But if the file is in the real "/", I can't get it. i.e.

wget -O - ftp://user:mypasswd@machine1//README

I think I've about reached the point where I need to give up on wget and 
use a chat script to do the ftp "by hand" :-(

Jim




> 
> D. Stimits, stimits at idcomm.com
> 
> 
>>            => `-'
>>Connecting to machine1:21... connected!
>>Logging in as user ... Logged in!
>>==> TYPE I ... done.  ==> CWD not needed.
>>==> PORT ... done.    ==> RETR README ...
>>No such file `README'.
>>
> 
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> Join us on IRC: lug.boulder.co.us port=6667 channel=#colug
> 






More information about the LUG mailing list