Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Jun 2004 00:00:58 GMT
From:      Arkadi Shishlov <arkadi@hosting.lv>
To:        freebsd-bugs@FreeBSD.org
Subject:   bin/67943: find(1) fails when current directory is not readable by user
Message-ID:  <200406150000.i5F00wob059672@freefall.freebsd.org>

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

The following reply was made to PR bin/67943; it has been noted by GNATS.

From: Arkadi Shishlov <arkadi@hosting.lv>
To: FreeBSD-gnats-submit@FreeBSD.org
Cc:  
Subject: bin/67943: find(1) fails when current directory is not readable by
	user
Date: Mon, 14 Jun 2004 21:35:56 +0300

 >Number:         67943
 >Category:       bin
 >Synopsis:       find(1) fails when current directory is not readable by user
 >Confidential:   no
 >Severity:       non-critical
 >Priority:       medium
 >Responsible:    freebsd-bugs
 >State:          open
 >Quarter:        
 >Keywords:       
 >Date-Required:
 >Class:          sw-bug
 >Submitter-Id:   current-users
 >Arrival-Date:   Mon Jun 14 18:40:22 GMT 2004
 >Closed-Date:
 >Last-Modified:
 >Originator:     Arkadi Shishlov
 >Release:        FreeBSD 4.9-RELEASE-p3 i386
 >Organization:
 >Environment:
 System: FreeBSD idea.hosting.lv 4.9-RELEASE-p3 FreeBSD 4.9-RELEASE-p3 #0: Wed Mar 3 21:51:26 EET 2004 root@idea.hosting.lv:/usr/obj/usr/src/sys/idea i386
 
 >Description:
 find(1) utility opens current directory dotfd = open(".", O_RDONLY, 0)
 and use obtained dotfd handle later in fchdir(). 
 If current directory is not readable by user then find fails.
 
 >How-To-Repeat:
 mkdir dir
 chmod -r dir
 cd dir
 find /tmp
 find: .: Permission denied
 
 >Fix:
 dotfd handle is only used when -exec predicate is requested.
 find(1) from GNU findutils combat this situation by using getcwd()
 call in case cwd is not readable.
 >Release-Note:
 >Audit-Trail:
 >Unformatted:
 _______________________________________________
 freebsd-bugs@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
 To unsubscribe, send any mail to "freebsd-bugs-unsubscribe@freebsd.org"



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