wget is working only when used with sudo

Posted by Yusuf on Server Fault See other posts from Server Fault or by Yusuf
Published on 2010-12-17T05:36:25Z Indexed on 2010/12/21 5:22 UTC
Read the original article Hit count: 336

Filed under:
|
|

I'm having quite a strange behavior with wget since yesterday.

I can download files by using sudo wget, but when I try the same file with only wget, I can get this error:

yusufh@ubuntu-yuh:~$ wget http://www.kegel.com/wine/winetricks
--2010-12-17 09:34:11--  http://www.kegel.com/wine/winetricks
Resolving www.kegel.com... failed: Name or service not known.
wget: unable to resolve host address `www.kegel.com'

and with sudo wget:

yusufh@ubuntu-yuh:~$ sudo wget http://www.kegel.com/wine/winetricks
--2010-12-17 09:35:37--  http://www.kegel.com/wine/winetricks
Connecting to 127.0.0.1:5865... connected.
Proxy request sent, awaiting response... 200 OK
Length: 190672 (186K) [text/plain]
Saving to: `winetricks'

100%[==================================================================================================>] 190,672     --.-K/s   in 0.03s   

2010-12-17 09:35:37 (6.92 MB/s) - `winetricks' saved [190672/190672]

After the comments below, here is an update:

I can use Google Chrome or Firefox perfectly without running it as root.

I use ntlmaps to connect to the office proxy. So I need to use 127.0.0.1:5865 as the proxy for clients.

Result for env | grep -i proxy:

NO_PROXY=localhost,127.0.0.0/8,*.local,
http_proxy=127.0.0.1:5865
ftp_proxy=127.0.0.1:5865
all_proxy=socks://127.0.0.1:5865/
ALL_PROXY=socks://127.0.0.1:5865/
https_proxy=127.0.0.1:5865
no_proxy=localhost,127.0.0.0/8,*.local

while sudo env | grep -i proxy is empty!

HELP!

© Server Fault or respective owner

Related posts about ubuntu

Related posts about proxy