#712053 unable to search as non-root user: /var/lib/dhelp/documents.index is readable only by root

#712053#5
Date:
2013-06-12 15:23:24 UTC
From:
To:
$> dhelp dipy
Starting dsearch for dipy
search++: error: could not read index from "/var/lib/dhelp/documents.index": Permission denied
Use of uninitialized value $n_results in numeric gt (>) at /usr/lib/cgi-bin/dsearch line 337.
Created new window in existing browser session.

$> ls -ld /var/lib/dhelp/documents.index
-rw------- 1 root root 34662327 Jun 12 11:20 /var/lib/dhelp/documents.index

#712053#10
Date:
2015-10-31 21:15:44 UTC
From:
To:
Hi Yaroslav,

This seems to be the effect of a restrictive umask (0077,
specifically) to user root, either through explicitly setting it at
your startup files, or through pam settings.

Dhelp code does not set permissions for the created files, rather
assumes the customary 0022 umask for user root. There is a *lot* of
code out there that does this assumption, so I would not consider this
a bug.

Although it is quite some time since the original report, if you could
confirm whether that was the case then it would be useful.

regards
George

#712053#15
Date:
2015-11-04 14:36:41 UTC
From:
To:
- I do have umask 077 for my user
- I do not set umask 077 explicitly anywhere for root, so if I just
  login in a terminal console, root's umask 022
- umask is restrictive (077) if I su or sudo into root:

% umask
077
% su
Password:
root@xxx:/home/yoh# umask
0077
root@xxx:/home/yoh# exit
% sudo -s
[sudo] password for yoh:
# umask
077
#
% umask 022
% umask
022
% su
Password:
root@xxx:/home/yoh# umask
0022

hope this helps