Date: Fri, 28 Dec 2001 00:40:02 -0800 (PST) From: "Crist J . Clark" <cjc@FreeBSD.ORG> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/33235: find terminates with "find: fts_read: Permission denied" Message-ID: <200112280840.fBS8e2c85293@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/33235; it has been noted by GNATS. From: "Crist J . Clark" <cjc@FreeBSD.ORG> To: Heikki Suonsivu <hsu@bbnetworks.net> Cc: FreeBSD-gnats-submit@FreeBSD.ORG Subject: Re: bin/33235: find terminates with "find: fts_read: Permission denied" Date: Fri, 28 Dec 2001 00:31:58 -0800 On Thu, Dec 27, 2001 at 12:05:53PM +0200, Heikki Suonsivu wrote: [snip] > >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. A "permission denied" is usually not a fatal error, but in this case, the fts_read(3) call is getting the error, which shouldn't happen. I _think_ I understand why this may be happening. When you use the '-s' switch, there may be an attempt to compare a file name to one that we cannot read... But I'm not sure how this could happen. Could you give us a long listing of the portion of file hierarchy (both a little before and after too) where you think this is failing? -- "It's always funny until someone gets hurt. Then it's hilarious." Crist J. Clark | cjclark@alum.mit.edu | cjclark@jhu.edu http://people.freebsd.org/~cjc/ | cjc@freebsd.org 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?200112280840.fBS8e2c85293>