# anonymous wget....[solved]

## jon_vas

Hi. I can`t get wget to do a anonymous login over ftp when i am login as my normal user. it Tries to login as root everytime. i have login=anonymous

in both /etc/wget/wgetrc and $HOME/.wgetrc   :Confused:  And i can`t use "ftp://anonymous@sdløarijewilfa.com/file/and/shit" becoulse it is called from a program.  Anybody got an idea?

-jon_vasLast edited by jon_vas on Wed Dec 08, 2004 3:06 pm; edited 1 time in total

----------

## flazz

wget is being called from a program? is the program suid root?

if so it would make sense because any subprocs forked from it will be forked as if root called them.

----------

## jon_vas

no. even if i try to run a

"wget --timeout=10 --spider --passive-ftp ftp://ftp.gwdg.de/pub/misc/gcc/releases/gcc-3.3.5/gcc-core-3.3.5.tar.bz2 " from my normal user(not root) it tries to login as root. i Just dont get it. when i log in as root and run the same command it logs in as anonymous.

----------

## d_m

 *jon_vas wrote:*   

> no. even if i try to run a
> 
> "wget --timeout=10 --spider --passive-ftp ftp://ftp.gwdg.de/pub/misc/gcc/releases/gcc-3.3.5/gcc-core-3.3.5.tar.bz2 " from my normal user(not root) it tries to login as root. i Just dont get it. when i log in as root and run the same command it logs in as anonymous.

 

Two ideas:

1. Try passing --http-user=${USER} on the cmdline just to see what it does.

2. Try temporarily renaming the wgetrc files to something else and see if you have the same behavior.

----------

## jon_vas

No difference    :Sad:   i have run out of ideas. just does not get why it behave like it do.

-jon_vas

----------

## d_m

 *jon_vas wrote:*   

> No difference   :(  i have run out of ideas. just does not get why it behave like it do.
> 
> -jon_vas

 

If you just run the command 'ftp ftp.server.net' does that work as expected?

Do you have any proxies set up, or squid, or anything like that?

----------

## jon_vas

"220-Login as "ftp" or "anonymous" and use your email address as password.

220-

220 ftp.gwdg.de FTP server (Version wu-2.4.2-academ[BETA-18-em](1) Fri Apr 4 23:14:50 MEST 2003) ready.

500 'AUTH SSL': command not understood.

SSL not available

530 User root access denied.

Login failed.

Remote system type is UNIX.

Using binary mode to transfer files.

"

no proxy or anything 

the output from the wget is like this:

"ftp://ftp.gwdg.de/pub/misc/gcc/releases/gcc-3.3.5/gcc-core-3.3.5.tar.bz2

  (try: 2) => `Archive/gcc-core-3.3.5.tar.bz2'

Connecting to ftp.gwdg.de[134.76.11.100]:21... connected.

Logging in as root ...

The server refuses login."

so it seems lt is local. but why the damn root.....

i use ssl auth for cvs but it should work for anonymous anyway.

-argh

----------

## d_m

Do you have a .netrc file in your homedir? Both 'ftp' and 'wget' will use this to get default user names etc.?

Have you tried this from different user accounts? It might be worth making a 'dummy' user just to see if you get this same behavior when using their account?

----------

## jon_vas

It was the .netrc file. thanks. i had all forgotten about it.   :Very Happy: 

-Jon_vas

----------

