Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Mar 2002 11:00:38 +0200
From:      Stas Kysel <stas_k_freebsd@tiger.unisquad.com>
To:        Richard Glidden <richard@glidden.org>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Locate database not finding all files accessible by nobody
Message-ID:  <20020327110038.A14725@tiger.unisquad.com>
In-Reply-To: <20020309020112.K11958-100000@charon.acheron.localnet>; from richard@glidden.org on Sat, Mar 09, 2002 at 02:20:03AM -0500
References:  <20020309020112.K11958-100000@charon.acheron.localnet>

next in thread | previous in thread | raw e-mail | index | archive | help

Richard,

Recently I met the same trouble and was searching maillists to find
solution. Unfortunately, your question was not answered. Finally, I found
what was happening in my case, and probably this will help you or
more probably somebody else.

1. System was upgraded, so I mounted old partitions under /old
  mkdir /old
  chmod 700 /old	# Just in case. Old suids, you know,...
  mount /dev/ad2s1a /old
  ...
2. mode of /old looked like 755 when /old was mounted, but permissins
  were a bit strange:
  a. find, if run as non-root, was able to chdir to /old, but was not able
     to chdir back to ".." (probably because of no "r" in 700)
  b. non-root shell behaved the same way: can chdir to /old, cant chdir
     back to ".."

Of course, it is not expected behaviour of OS to show one mode in chmod but
to use another mode in open()/chdir(), but it is a sort of described in
mount(8) so I think is is not worth a PR.

\bye
Stas

On Sat, Mar 09, 2002 at 02:20:03AM -0500, Richard Glidden wrote:
> 
> I recently noticed that the 'locate' command on my machine is no longer
> finding all the files that are accessible by the user 'nobody' like it
> should.  I've tried running /etc/periodic/weekly/310.locate as root to
> rebuild the database, but I get the same results.  If I su to 'nobody' and
> run 'find' from the root directory, it returns all the files that I would
> expect to be in the locate database.  Running /usr/libexec/locate.updatedb
> as root builds a complete database, but it includes files that aren't
> publically accessible and shouldn't be included.
> 
> The locate database that's built by the 310.locate script seems to include
> all the files up to the last file in the last user's home directory, but
> not /kernel or anything after it (when you do a depth-first search in
> alphabetical order).
> 
> ie: 'locate home' shows files up to '/home/zzz/zzz.txt' and 'locate boot'
> finds the files in /boot, but 'locate kernel', or 'locate usr' finds
> nothing.
> 
> I'm running 4.5-RELEASE-p2.  I've recently rebuilt and reinstalled the
> world, but it has not solved the problem.  I know it was working on
> 4.4-RELEASE, but that was a long time ago, and too many things have
> changed since then for me to figure out exactly when it broke.
> 
> Any suggestions on how to fix this would be appreciated.
> 
> Thanks,
> 
> - Richard Glidden
>   richard@glidden.org
> 
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message
> 
> 
> 
> 

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020327110038.A14725>