From owner-freebsd-bugs Thu Dec 27 2:10: 7 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id E015737B416 for ; Thu, 27 Dec 2001 02:10:00 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id fBRAA0E75454; Thu, 27 Dec 2001 02:10:00 -0800 (PST) (envelope-from gnats) Received: from katiska.runkoverkot.net (ns1.bbnetworks.net [212.16.96.1]) by hub.freebsd.org (Postfix) with ESMTP id BC39437B417 for ; Thu, 27 Dec 2001 02:05:57 -0800 (PST) Received: (from hsu@localhost) by katiska.runkoverkot.net (8.11.6/8.11.6) id fBRA5rM02065; Thu, 27 Dec 2001 12:05:53 +0200 (EET) (envelope-from hsu) Message-Id: <200112271005.fBRA5rM02065@katiska.runkoverkot.net> Date: Thu, 27 Dec 2001 12:05:53 +0200 (EET) From: Heikki Suonsivu Reply-To: Heikki Suonsivu To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: bin/33235: find terminates with "find: fts_read: Permission denied" Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 33235 >Category: bin >Synopsis: find terminates with "find: fts_read: Permission denied" >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Dec 27 02:10:00 PST 2001 >Closed-Date: >Last-Modified: >Originator: Heikki Suonsivu >Release: FreeBSD 4.4-STABLE i386 >Organization: bbnetworks >Environment: System: FreeBSD katiska.runkoverkot.net 4.4-STABLE FreeBSD 4.4-STABLE #1: Fri Oct 12 03:29:04 EEST 2001 hsu@katiska.runkoverkot.net:/usr/obj/usr/src/sys/CAT i386 Stable from october. I think the problem has been around for a while, but I had had no time to figure out why locate database seemed to be empty. >Description: Symtom is that locate update does not include all files in the database, because the find terminates early. >How-To-Repeat: On one of my hosts this will terminate when run as nobody: find -s / \! \( -fstype ufs \) -prune -or -path /tmp -prune -or -path /usr/tmp -prune -or -path /var/tmp -prune -or -print ... /xx/sorted/2001/12/13/image_2001_1213_142409_01.jpg /xx/sorted/2001/12/13/image_2001_1213_142418_01.jpg /xx/sorted/2001/12/13/imagfind: fts_read: Permission denied e_2001_1213_142430_01.jpg /xx/sorted/2001/12/13/image_2001_1213_142436_01.jpg /xx/sorted/2001/12/14 /xx/sorted/2001/12/14/image_2001_1214_050908_01.jpg /xx/sorted/2001/12/14/image_2001_1214_050910_01.jpg /xx/sorted/2001/12/14/image_2001_1214_050923_01.jpg The command is what locate.updatedb uses. I found this when trying to figure out why locate database did not contain some of the files which certainly were there. >Fix: If -s is left out, find completes. Thus, workaround for locate.updatedb problem is replacing -s with "| sort" after find, but that is not particularly efficient. Find should not consider permission denied a fatal error. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message