Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Cron can`t use links in /etc/cron.d/
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
tashiy
n00b
n00b


Joined: 14 May 2012
Posts: 3

PostPosted: Mon May 14, 2012 9:11 am    Post subject: Cron can`t use links in /etc/cron.d/ Reply with quote

Hi all

I`m getting the following errors, when I link files in /etc/cron.d/
Code:

[ root@HOSTNAME: cron.d ] /etc/init.d/vixie-cron restart ; tail -f /var/log/cron
--> Stopping vixie-cron ...                                                                                                                    [ ok ]
--> Starting vixie-cron ...                                                                                                                    [ ok ]
May 11 17:13:22 HOSTNAME cron[7548]: (*system*) CAN'T OPEN (/etc/cron.d/3ware_cron_jobs)
May 11 17:13:22 HOSTNAME cron[7548]: (*system*) CAN'T OPEN (/etc/cron.d/baruwa_cron_jobs)
May 11 17:13:22 HOSTNAME cron[7548]: (*system*) CAN'T OPEN (/etc/cron.d/clamav-unofficial-sigs-cron)
May 11 17:13:22 HOSTNAME cron[7548]: (*system*) CAN'T OPEN (/etc/cron.d/imap_spam_report_cron_jobs)
May 11 17:13:22 HOSTNAME cron[7548]: (*system*) CAN'T OPEN (/etc/cron.d/mailscanner_cron_jobs)
May 11 17:13:22 HOSTNAME cron[7548]: (*system*) CAN'T OPEN (/etc/cron.d/mailwatch_cron_jobs)
May 11 17:13:22 HOSTNAME cron[7548]: (*system*) CAN'T OPEN (/etc/cron.d/observium_cron_jobs)
May 11 17:13:22 HOSTNAME cron[7548]: (*system*) CAN'T OPEN (/etc/cron.d/rsyslog)
May 11 17:13:22 HOSTNAME cron[7548]: (*system*) CAN'T OPEN (/etc/cron.d/rsyslog_crontabs)
May 11 17:13:22 HOSTNAME cron[7548]: (*system*) CAN'T OPEN (/etc/cron.d/sysusage_cron_jobs)


File permissions:

Code:

[ root@HOSTNAME: cron.d ] ls -lh
total 24K
lrwxrwxrwx 1 root root   25 Jan 11  2011 3ware_cron_jobs -> /etc/3dm2/3ware_cron_jobs
lrwxrwxrwx 1 root root   42 Dec  8  2010 baruwa_cron_jobs -> /etc/MailScanner/_scripts/baruwa_cron_jobs
-rw-r--r-- 1 root root  213 May 11 16:42 cacti
lrwxrwxrwx 1 root root   55 Dec  8  2010 clamav-unofficial-sigs-cron -> /etc/clamav-unofficial-sigs/clamav-unofficial-sigs-cron
lrwxrwxrwx 1 root root   56 Dec 29  2010 imap_spam_report_cron_jobs -> /etc/postfix/imap_spam_report/imap_spam_report_cron_jobs
lrwxrwxrwx 1 root root   47 Dec  8  2010 mailscanner_cron_jobs -> /etc/MailScanner/_scripts/mailscanner_cron_jobs
lrwxrwxrwx 1 root root   45 Dec 30  2010 mailwatch_cron_jobs -> /etc/MailScanner/_scripts/mailwatch_cron_jobs
-rw-r--r-- 1 root root  389 May 11 16:42 monitorix
-rw-r--r-- 1 root root  170 May 11 16:42 mosshe
-rw-r--r-- 1 root root 1.2K May 11 16:42 munin
lrwxrwxrwx 1 root root   45 Dec 30  2010 observium_cron_jobs -> /etc/MailScanner/_scripts/mailwatch_cron_jobs
-rw-r--r-- 1 root root  209 May 11 16:42 postfix_recipients_mgmt
lrwxrwxrwx 1 root root   12 Feb  1  2011 rsyslog -> /etc/rsyslog
lrwxrwxrwx 1 root root   38 Feb  1  2011 rsyslog_crontabs -> /etc/rsyslog/_scripts/rsyslog_crontabs
-rw-r--r-- 1 root root  325 May 11 16:42 sendmailanalyzer
lrwxrwxrwx 1 root root   41 Feb 16  2011 sysusage_cron_jobs -> /etc/sysusage/_scripts/sysusage_cron_jobs


Any Ideas what`s wrong?

Kind Regards
Tashiy
Back to top
View user's profile Send private message
massimo
Veteran
Veteran


Joined: 22 Jun 2003
Posts: 1226

PostPosted: Mon May 14, 2012 11:29 am    Post subject: Reply with quote

It simply just does not work with symbolic links (in /etc/cron.d/). Maybe something which would be worth mentioning in the man-page/documentation.
_________________
Hello 911? How are you?
Back to top
View user's profile Send private message
tashiy
n00b
n00b


Joined: 14 May 2012
Posts: 3

PostPosted: Mon May 14, 2012 3:19 pm    Post subject: Reply with quote

Thanks for your reply. But I`m really shure this works in the past.
Also when I search the internet I find many articles that its a common way to create symlinks in /etc/cron.d/ like in this Ubuntu Manpage: http://manpages.ubuntu.com/manpages/oneiric/man8/cron.8.html
Back to top
View user's profile Send private message
massimo
Veteran
Veteran


Joined: 22 Jun 2003
Posts: 1226

PostPosted: Mon May 14, 2012 7:39 pm    Post subject: Reply with quote

There are different cron daemons out there [1]. Looking at the vixie-cron sources I would say it's not possible to use symbolic links in that directory. The one from Ubuntu seems to be patched.

[1] Gentoo Cron Guide
_________________
Hello 911? How are you?
Back to top
View user's profile Send private message
tashiy
n00b
n00b


Joined: 14 May 2012
Posts: 3

PostPosted: Wed May 16, 2012 8:23 am    Post subject: Reply with quote

Thanks for your investigation! Then we have to do it the other way around and put the scripts directly into /etc/cron.d/
Back to top
View user's profile Send private message
Hello71
n00b
n00b


Joined: 17 May 2012
Posts: 35

PostPosted: Thu May 17, 2012 1:19 am    Post subject: Reply with quote

You could of course use a hard link instead of a symbolic link.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum