Tags:
create new tag
view all tags

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

TWiki version: TWikiRelease04x01x02
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: RHEL5
Web server: Apache2.0
Perl version: 5.8.8
Client OS: Windows XP
Web Browser: IE 6.0
Categories:  

-- ZhouXuan - 30 Apr 2008

Answer

ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is 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

Change status to:
Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2008-05-07 - MichaelDaum
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.