venkat
venkat

Reputation: 141

tar command changing the owner:group while extracting

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

Upvotes: 13

Views: 24535

Answers (1)

Paul Zakharov
Paul Zakharov

Reputation: 547

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?

Upvotes: 23

Related Questions