redirecting out of a command invoked by sudo fails

Mikkel mikkel at infinity-ltd.com
Fri Jun 25 19:49:17 UTC 2010


On 06/25/2010 01:38 PM, JD wrote:
> cd /var/lib
> sudo tar cjf - rpm > rpm.tar.bz2
> sh: rpm.tar.bz2: cannot create [Permission denied]
> 
> My username is in /etc/sudoers:
> jd      ALL=(ALL)       NOPASSWD: ALL
> 
> Yeah... I know it is not safe to set NOPASSWD and all that...
> but that is not why I am asking about.
> 
> Is this an established legacy behaviour of sudo?

Dumb question - does your user have write permission in the
directory you are trying to create rpm.tar.bz2 in?

Or am I misunderstanding what you are trying to do, and you want
rpm.tar.bz2 to be owned by root?

Mikkel
-- 

  Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
Url : http://lists.fedoraproject.org/pipermail/users/attachments/20100625/ad440da2/attachment.bin 


More information about the users mailing list