Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

tar command changing the owner:group while extracting

Tags:

linux

ubuntu

While extracting a file using this command tar -zxf bluez-arm-package.tgz the owner(1000):group(pulse) of the files and directories is changing as below example.

Example:

drwxrwxr-x    4 1000     pulse         1024 Jul 21 00:32 dbus-1 

The actual should be:

drwxrwxr-x    4 root     root          1024 Jul 21 00:32 dbus-1
like image 601
venkat Avatar asked Dec 18 '22 15:12

venkat


1 Answers

There is an option for output stream in tar : --no-same-owner

So

tar xvf test_tar.tar --no-same-owner

will probably create files with user who launch this command as owner. It's a little bit strange as this option (--no-same-owner) should be default for ordinary (non-superuser) users.

Does it work for you?

like image 70
Paul Zakharov Avatar answered Dec 21 '22 03:12

Paul Zakharov