2 ms·
How can a normal user create files owned by another user? If tar allowed that, you could write any file with any permission and any ownership anywhere by first
by jolmg 9y ago
How can a normal user create files owned by another user? If tar allowed that, you could write any file with any permission and any ownership anywhere by first crafting a tar file of those files and then extracting them. It'd render the file permissions and ownership system completely moot.
EDIT: To get the effect you want, run tar as root. That's required to ensure you have the permission to override the DAC system, first.