Reputation: 1
I am looking for a way to allow only an administrator to untar a file.
I have found other posts that change the permissions of the enclosed files in the archive but not the file its-self. As well as this I have tried to set user permissions using chown and chmod, which will work until the file is moved to another system where the permissions are not persisted.
Is there a way for a tar.gz file to have permissions set to only allow an admin user to untar it, with these permissions being persisted?
Thanks!
Upvotes: 0
Views: 325
Reputation: 7225
No, there is no such way. The tar (or compressed tar.gz, tar.Z) file is container of other files inside. The same is true about compression, it just apply algorithm to the original file to compress (or decompress it).
You can do few things:
zip
with password and provide the password on "need to
know" basisUpvotes: 1