webdruid and cron.daily error: Permission denied
Hi,
I'm trying to use webdruid on my apache2 server.
I'm being following the gerasiov.txt in /usr/share/doc/webdruid/examples
and have /etc/cron.daily/webdruid file:
<file>
#!/bin/sh
# /etc/cron.daily/webdruid: webdruid daily maintenance script
WEBDRUID_BIN=/usr/bin/webdruid
WEBDRUID_SITELIST=/etc/webdruid/site.list
LOG_DIR=/var/log/apache2
REPORT_ROOT=/var/www/webdruid/
cat "$WEBDRUID_SITELIST" | while read HOSTNAME NAME;do (
if [ ! -d "${LOG_DIR}/${NAME}" ];then exit 1;fi
if [ ! -d "${REPORT_ROOT}${NAME}" ];then
mkdir "${REPORT_ROOT}${NAME}"
fi
${WEBDRUID_BIN} -Q -n "${HOSTNAME}" -o "${REPORT_ROOT}${NAME}"
"${LOG_DIR}/${NAME}/access.log.1"
) done
exit 0
</file>
I made directories:
/var/log/apache2/csplbubba/
/var/log/apache2/csplmoodle
/var/log/apache2/csplwordpress
These directories and files access.log.1 have following rights:
/var/log/apache2# ls -l cspl*
csplbubba:
total 0
-rw-r----- 1 root adm 0 Oct 6 15:40 access.log.1
csplmoodle:
total 0
-rw-r----- 1 root adm 0 Oct 6 15:41 access.log.1
csplwordpress:
total 0
-rw-r----- 1 root adm 0 Oct 6 15:41 access.log.1
When I run /etc/cron.daily/webdruid I get error message:
/etc/cron.daily# ./webdruid
./webdruid: 19: /var/log/apache2/csplbubba/access.log.1: Permission
denied
How can I solve this problem?
--
Regards, Pal
<http://cspl.me>
Reply to: