I have same error message.
This file is in /root
File name: rsync-shell.sh
PHP Code:
#!bin/bash
sudo rsync -az --delete /home/mark/music/ /mymounts/d2p1/home_backup
If I "sudo crontab -l" I get:
PHP Code:
# m h dom mon dow
0 * * * * /root/rsync-shell.sh
I continually receive this message on my servers mail from cron daemon:
PHP Code:
/bin/sh: /root/rsync-shell.sh: Permission denied
I thought that by putting the rsync-shell.sh in root that permissions would be no problem, but I guess I am wrong.
There is a difference if I "sudo crontab -e" or "crontab -e" if I do not use sudo it says "there is no crontab for mark" (I am only user on server as mark).
I am new this year to Ubuntu headless server, am learning loads but I surely have to work at it!
Help anyone?
Edit to add: I created a crontab -e without "sudo", entered the 0 * * * * /root/rsync-shell.sh file and it failed with same reason.
Bookmarks