Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Dec 2001 12:05:53 +0200 (EET)
From:      Heikki Suonsivu <hsu@bbnetworks.net>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/33235: find terminates with "find: fts_read: Permission denied"
Message-ID:  <200112271005.fBRA5rM02065@katiska.runkoverkot.net>

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

>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




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