[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] Using wget in a script run by sudo

From: Dan Rabb
Subject: Re: [Bug-wget] Using wget in a script run by sudo
Date: Wed, 5 Jun 2013 15:01:32 -0700 (PDT)

Sorry, please disregard my ridiculously stupid question. The permission denied 
is coming from the shell, the user doesn't have write access (which is weird, 
as you would think root would). I resolved the issue. Apologies. 


----- Original Message -----

From: "Dan Rabb" <address@hidden> 
To: address@hidden 
Sent: Wednesday, June 5, 2013 2:26:19 PM 
Subject: Using wget in a script run by sudo 

I have a wget command inside a script, which is executed with sudo 
[scriptname.sh]. The wget command is: 
wget --quiet --user=$REALUSER --password=$PASSWORD $link 

The script kept bombing out because the file that it's supposed to download, 
wasn't there. I removed the --quiet and added a '-o' and got the following: 
wget --user=[my actual username]: permission denied 

So, armed with that information, I played around outside the script and found 
out that if I execute: 
wget --user=[user] --password=[password] [link] 
The download completes successfully. However, if I try: 
sudo wget --user=[user] --password=[password] [link] 
I get the permission denied error. 

Is this by design? Does wget now allow you to specify and user other than $USER 
(in the sudo case, $USER=root). 

Dan Rabb 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]