updatedb (slocate, locate) privacy settings

updatedb (slocate) is a powerful indexing utility to query whom you can use locate keyword command within a shell, hereafter a note about making it more sensitive to users privacy through editing /etc/updatedb.conf file and PRUNEPATHS= vairable.

Despite some other growing up software such as Tacker and Beagle (the latter one using deprecated .NET porting to linux called mono) I still make a heavy use of slocate since it is definitely the most handy.

slocate updates its own database once a day via cron using by default user nobody. To force an update you can run command updatedb, which should be run as a root user in order to get it do its job systemwide. This tool, however, may have a drawback: indexing the whole system’s files it can expose their content to someone gaining read access to the database file located in /var/lib/slocate/slocate.db

Being a very useful system tool I wouldn’t suggest to remove it, instead two actions can be taken for improving its respect towards users privacy:

1) forbidding read access to the home directory for others via $chmod o-r directory
Note: this way, however, if updatedb is issued as root user nobody can escape!

2) forbidding updatedb to index home directories via editing of file /etc/updatedb.conf

In the “/etc/updatedb.conf” file you can specify the directories you want to exclude.
PRUNEPATHS=”/tmp”
export PRUNEPATHS
As seen in the above example the PRUNEPATHS variable should be set to exclude the directory you want. If there are multiple directories you want exclude, just seperate them with a space e.g
PRUNEPATHS=”/tmp /dir1 /dir2″
export PRUNEPATHS

| Print This Post Print This Post | Email This Post Email This Post
RSS 2.0 | Trackback | Comment

No Responses to “updatedb (slocate, locate) privacy settings”


Leave a Reply

  • Page visits

    • 24
  • Polls

    Did you manage using the internal modem?

    View Results

    Loading ... Loading ...
  • Categories

  • Meta

  • Recent Comments

  • Archives

  • Most Visited

  • Linux On Laptops

    -->