From owner-freebsd-questions Wed Mar 27 1: 1: 3 2002 Delivered-To: freebsd-questions@freebsd.org Received: from tiger.unisquad.com (nat.unisquad.com [212.110.132.221]) by hub.freebsd.org (Postfix) with ESMTP id 1DADB37B400 for ; Wed, 27 Mar 2002 01:00:52 -0800 (PST) Received: from tiger.unisquad.com (root@localhost [127.0.0.1]) by tiger.unisquad.com (8.12.1/8.12.1) with ESMTP id g2R90jQe014766 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Wed, 27 Mar 2002 11:00:45 +0200 Received: (from stask@localhost) by tiger.unisquad.com (8.12.1/8.12.1/Submit) id g2R90cKT014765; Wed, 27 Mar 2002 11:00:38 +0200 Date: Wed, 27 Mar 2002 11:00:38 +0200 From: Stas Kysel To: Richard Glidden Cc: freebsd-questions@freebsd.org Subject: Re: Locate database not finding all files accessible by nobody Message-ID: <20020327110038.A14725@tiger.unisquad.com> References: <20020309020112.K11958-100000@charon.acheron.localnet> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020309020112.K11958-100000@charon.acheron.localnet>; from richard@glidden.org on Sat, Mar 09, 2002 at 02:20:03AM -0500 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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