dhelp cronjob creates an inaccesible by web server documents index when root umask is not the default
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
dhelp (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: dhelp
The /etc/cron.
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:
+ (umask 022 && ruby1.8 -rdhelp -e "Dhelp: