[lug] wget question

Jim Buzbee James.Buzbee at echostar.com
Mon Jun 3 10:15:24 MDT 2002


D. Stimits wrote:
> Jim Buzbee wrote:
> 
>>Anyone have expertise with wget ?
>>
>>I've been trying to convince wget to fetch a file for me without much
>>luck. I'm using an ftp url with embedded username and password. e.g. :
>>
>>ftp://user:password@host/
>>
>>My problem is that the file I want to get is one directory above the
>>login directory, i.e. ftp://user:password@host/../MYFILE - But wget
>>seems to ignore the .. path.  If I interactively ftp in, I can get the
>>file without issue so it's not any sort of permission problem.
> 
> 
> I would have to wonder about the ".." in the path, it is a relative
> path. The above URL is not legit in most cases, it says to go to the ftp
> root (usually "/" unless it is a chroot environment, in which case ".."
> must be ignored or else allow the session to exit the chroot jail
> environment) and then to the parent of the ftp root...which is outside
> of the ftp space. I would double check that the ".." is legitimate, wget
> is probably doing the right thing. My guess is that manual login is
> tolerant of error, and wget stops when it sees the error (as it should).



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 :

  wget -O - ftp://user:mypasswd@machine1/../README
--10:05:02--  ftp://user:xxxxxxxx@machine1:21/README
            => `-'
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'.





> 
> D. Stimits, stimits at idcomm.com
> _______________________________________________
> 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