I am writing a backup script. The script is located in /usr/local/backup-scripts
The files should be stored to /var/backup/subdirectory
I want to run the script using cron job or systemd-timer.
I have no idea how to set the permissions correctly. Of course for testing I can sudo run the script. But what when the cron job or systemd runs the script? Do they (they=cron or systemd) have su-rights?
Unfortunately I am not that familiar with the permission in Linux so I have no idea if I have to chown the script to a special user (maybe sys???) or what the "right" way is. Appreciate every help, cheers Stefan
backup-user
might need extra permissions to access all files that ought to be backed up. – PerlDuck Sep 28 '18 at 19:33root
so it can access all the sources. But it just depends on what you want to backup. – PerlDuck Sep 28 '18 at 20:06