Skip to main content

Thread: sudo wget piped to tar has wrong file owner


greetings,

i'm trying download file , extract in 1 line, extracted file owned me instead of root though i'm using sudo:

code:
sudo sh -c 'wget http://download.macromedia.com/pub/labs/flashplayer10/libflashplayer-10.0.42.34.linux-x86_64.so.tar.gz -o- | tar -xzf -'
if don't try extract file, owned root expected:

code:
sudo sh -c 'wget http://download.macromedia.com/pub/labs/flashplayer10/libflashplayer-10.0.42.34.linux-x86_64.so.tar.gz'
any ideas on why happens , how work around it?

thanks!

apparently, can execute single command superuser sudo , not pipeline. example, if there bash script creates file , run script sudo, created file still have user , group ids. if required, can make root owner of file as,

code:
sudo chown root filename


Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [all variants] sudo wget piped to tar has wrong file owner


Ubuntu

Comments

Popular posts from this blog

DHT11 Time out error using v0.4.1library

Sketch upload fails with Java error (___REMOVE___/bin/avrdude)!

Arduino Uno + KTY81/210 temperature sensor