Web Hosting Talk







View Full Version : Trouble with cron.daily job


hci
05-31-2002, 12:44 AM
I have mailscanner running on my Raq 4i. I added the below script to cron.daily to clean out the saved viruses when they get a week old. Beats doing it manually.

http://www.sng.ecs.soton.ac.uk/mailscanner/files/contrib/clean_quarantine

Problem seems to be the cron job does not have access rights to delete the files/directories. If I use chmod to change the access rights on the files then it works. Problem is that when new files are added they are right protected of sorts again.

Anyone know a simple solution to this?

Matt

ellebi
05-31-2002, 03:57 AM
Is your cron.daily script owned by root?

This is my working configuration:
/etc/cron.daily/clean_quarantine is owned by root and the permission are 755
/var/spool/MailScanner and /var/spool/MailScanner/quarantine are owned by root with permissions 755
The daily and virus directories created by mailscanner are owned by root with permissions 700.
The virus files are owned by root with permission 600.

hci
05-31-2002, 10:35 AM
/etc/cron.daily//etc/cron.daily/clean_quarantine is owned by root and the permission are 755

How do I change the owner of clean_quarantine?

Matt

ellebi
05-31-2002, 01:25 PM
Originally posted by hci

How do I change the owner of clean_quarantine?


telnet/ssh to your machine
login as admin
su root
chown root.root /etc/cron.daily/clean_quarantine