I have a backup script that simply tars up a couple of folders, but it needs to be as root to read all the files without errors.
I read the UID article here:
http://www.linuxjournal.com/article/2114
and chmod my script to 4711, permission of the file is as follow:
-rws--x--x 1 root root 430 Nov 22 22:38 backup.sh*
However, when I run the script as a normal user, it still gives errors when running the tar command.
What am I doing wrong? How can I allow any regular users to run the script as root, I'll rather not have to fiddle with the sudoer file.
The backup script is something like:
---
#!/bin/bash
tar -zcf /backups/daily.tar.gz \
/backups/mysql/daily \
/home
---