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:
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 -o- | tar -xzf -'
any ideas on why happens , how work around it?code:sudo sh -c 'wget http://download.macromedia.com/pub/labs/flashplayer10/libflashplayer-10.0.42.34.linux-x86_64.so.tar.gz'
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
Post a Comment