On 4/16/07, Derk Gortemaker <[EMAIL PROTECTED]> wrote:
Place the following line in a file in the directory /etc/cron.d (works
in Suse linux, and probably all current linux distros)
/etc/cron.d/dspam_cleanups:
-- startfile
0 0 * * * dspam /usr/sbin/dspam_logrotate -a 30 -d /var/lib/dspam/data
-- endfile
the first dspam on that line tells crontab to run that command as the
user "dspam"
Thanks for the tip, but the data/$USER/$USER.log file is still changed
to dspam:dspam with a umask of 644 so the file can't be written to as
part of the delivery process.
Right now I have this script which runs right after dspam_logrotate
which fixes up the permissions.
#!/bin/sh
DATADIR=/usr/local/dspam/var/dspam/data
cd $DATADIR
for i in `ls` ; do
chown -R "$i:dspam" $i
done
find $DATADIR -type f -print0 | xargs -0r chmod 664
find $DATADIR -type d -print0 | xargs -0r chmod 775
-Dave