[balug-talk] updatedb: can not change group of file

David Alban extasia at extasia.org
Wed Sep 27 21:28:41 PDT 2006


On 9/27/06, Michael Paoli <Michael.Paoli at cal.berkeley.edu> wrote:
> I haven't attempted a significant search, but I did stumble across
> this:
> "The updatedb command is not compatible, and custom scripts that use
> updatedb may have to be updated"
> which at least hints that things may be significantly different.
> I found that in:
> http://fedora.redhat.com/docs/release-notes/fc5/#id2948673
> via:
> http://www.google.com/search?hl=en&lr=&q=updatedb+%22fedora+core+5%22&btnG=Search
> Perhaps comparing the source between the older and newer versions
> would be useful ... but there may be lots of changes beyond just
> that/those which are causing the particular difficulty you're
> encountering.

I, too, had found that.  And as a result, I'd compared the two man
pages (slocate's updatedb in fc4 with mlocate's updatedb page in fc5)
and found no difference in the -U and -o options I was using.

However, going back and checking again, I noticed:

       -l, --require-visibility IFLAG
              Set  the  "require  file visibility before reporting it" flag in
              the generated database to FLAG.

              If FLAG is 0 or no, locate(1) outputs the database entries  even
              if  the user running locate(1) could not have read the directory
              necessary to find out the file described by the database  entry.

              If  FLAG is 1 or yes (the default), locate(1) checks the permis-
              sions of parent directories of each entry before reporting it to
              the invoking user.  To make the file existence truly hidden from
              other users, the database  group  is  set  to  slocate  and  the
              database  permissions  prohibit  reading  the  database by users
              using other means than locate(1), which is sgid slocate.

When I add "--require-visibility 0" it worked.  Thanks for prodding me
to RRTFM (re-RTFM). :-)  Also, I needed to change -e DIRS to
--add-prunepaths PATHS in my cron job.

Excellent.  I get to use mlocate's updatedb on a machine on which I
don't have root.

Thanks!

-- 
Live in a world of your own, but always welcome visitors.


More information about the balug-talk mailing list