I have a script that runs regularly via cron
, that creates a tar.gz
file for the purpose of backing up a directory.
For reasons beyond my control, the only user who can execute the script via cron
is a root user. So the resulting tar
file can not be moved or deleted by any other user.
So, as part of the script, I want to execute a chown
and chmod
on the tar
file so that other users can manipulate it.
But is it good enough to just change permissions on the tar
file, or will the root user permissions also be saved to the files inside the tar
? When a user unpacks the tar
file, will they be able to act on those files as if they created the files themselves?
/tmp
for e. g.)