Public bug reported:

Binary package hint: dhelp

The /etc/cron.weekly/dhelp cron job is used by the dhelp package to
rebuild the debian help index (file /var/lib/dhelp/documents.index) by
deleting it and re-creating it.

However, if the umask of user root is more restrictive than the default
022, then the file may end-up being non-readable by the web server user
account (www-data) and thus the search does not work any more (shows no
results). This was the case in my system where the default umask was set
to 077.

ubuntu version: 9.10
dhelp version: 0.6.17ubuntu1

Until this is get fixed upstream (change to ruby code to invoke a chmod
call), the following patch in the cron job can fix this issue. It
launches a sub-shell (to protect from an unwanted pertaining umask
change in case of a script error) where it changes the umask and calls
the rebuild method as usual:

--- dhelp~      2009-05-05 16:35:00.000000000 +0300
+++ dhelp       2010-08-10 15:37:54.715465947 +0300
@@ -22 +22 @@
-    ruby1.8 -rdhelp -e "Dhelp::DhelpDocumentPool.new.rebuild"
+    (umask 022 && ruby1.8 -rdhelp -e "Dhelp::DhelpDocumentPool.new.rebuild")

** Affects: dhelp (Ubuntu)
     Importance: Undecided
         Status: New

-- 
dhelp cronjob creates an inaccesible by web server documents index when root 
umask is not the default
https://bugs.launchpad.net/bugs/615944
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to