Question
Hi,I encountered a problem with cache.db.
I've set
chown -R apache:apache /var/www/twiki
when setup twiki,but the owner of cache.db changed to be "root" itself.
[abc@xyz LdapContrib]$ pwd
/var/www/twiki/pub/_work_areas/LdapContrib
[abc@xyz LdapContrib]$ ls -l
total 1124 -rw-r--r-- 1 root root 1396736 Apr 30 11:00 cache.db
error in browser:
Software error:
Cannot open file /var/www/twiki/pub/_work_areas/LdapContrib/cache.db: Permission denied at /var/www/twiki/lib/TWiki/Contrib/LdapContrib.pm line 543.
For help, please send mail to the webmaster (root@localhost), giving this error message and the time and date of the error.
I chown of cache.db to apache,but over a period of time,it's owner turned to be "root" again.
I guess a setting for email notification in /etc/crontab may affect this issue,because I received email from /var/spool/mail/root
Subject: Cron <root@localhost> perl -I /var/www/twiki/bin /var/www/twiki/tools/mailnotify
........
constructed a new LdapContrib object
cacheAge=86978, lastUpdate=1245687855, refresh=1
updating cache
called refreshCache
called refreshUsersCache()
found 500 entries
.....
........................
and I 've set $TWiki::cfg{Ldap}{MaxCacheAge} = 0;
I don't know why the owner of cache.db changed to be root and cause the error in browser.
Please help if you can,thanks in advance!
Environment
--
ZhouXuan - 30 Apr 2008
Answer
If you answer a question - or have a question you asked answered by someone - please remember to edit the page and set the status to answered. The status is in a drop-down list below the edit box.
Maybe caused by crontab,change owner to apache
*/15 * * * *
apache perl I /var/www/twiki/bin /var/www/twiki/tools/mailnotify
--
ZhouXuan - 07 May 2008
Better don't run any TWiki cronjobs as root, last but not least for security reasons. Remove this line from
/etc/crontab and add it to the one of the user
apache to make sure it is run as
apache, not
root
--
MichaelDaum - 07 May 2008