Page 1 of 1

Issue with crontab

Posted: 19 May 2015, 13:01
by lemonandlime
Hello,

I run CSF on Ubuntu 14. I have a crontab (root) running a script which creates a backup and then encrypts it using gpg.

The thing is, the tar file is created but gpg does not encrypt it. The error log shows :

cron[30295]: (*system*csf-cron) WRONG FILE OWNER (/etc/cron.d/csf-cron)

BUT the tar file owner is ROOT which is correct.

if i run the command directly in shell it works. Via crontb it doesnt work. I have tried disabling CSF but it will still output :

cron[30295]: (*system*csf-cron) WRONG FILE OWNER (/etc/cron.d/csf-cron)

Any ideas?

Thanks

Re: Issue with crontab

Posted: 19 May 2015, 15:27
by ForumAdmin
No ideas with that one, I'm afraid. I just checked on our Ubuntu v14 test server and have no cron errors for csf-cron. The file ownership/permissions look like this:

Code: Select all

-rw-r--r--  1 root root   14 May 19 15:21 csf-cron
Unrelated to csf, but as a general rule with cron jobs, do make sure that you are using the full path to any binaries that you are using. For example with gpg ensure that you are using the full path to the binary plus any files you are using on your command line.