bugfindutils - Bugs: bug #19899, find fails when it encounters...

 
 

bug #19899: find fails when it encounters irrelevant restrictions on $PWD

Submitter:  None
Submitted:  Fri 18 May 2007 04:25:47 PM UTC
   
 
Category:  find Severity:  3 - Normal
Item Group:  Wrong result Status:  Need Info
Privacy:  Public Assigned to:  jay
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  Closed Release:  4.3.2
Fixed Release:  4.3.12
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 19 Dec 2007 10:43:03 PM UTC, comment #2: 

Still no response.  So...

Marking as closed on the assumption that this is the same bug as #15384.  Please open a new bug if the problem still exists in findutils-4.3.12.   Thanks.

James Youngman <jay>
Group administrator
Wed 22 Aug 2007 07:33:39 PM UTC, comment #1: 

Is this still a problem in 4.3.8?  Also, can you show the output of find --version, so we can tell if you were using the fts-based version?  (4.3.x can be configured to provide either oldfind and find, or find and ftsfind, where the fts-based version is the latter in each pair).  My guess is that the fts version behaves correctly, and that you are only seeing the problem with the older version.  I don't quite have the same setup as you described, but I attempted this:

$ mkdir /tmp/a /tmp/b
$ cd /tmp/b
$ chmod a-rx .
$ find /tmp/a
/tmp/a
$ oldfind /tmp/a
/tmp/a
oldfind: `.': Permission denied
$ find --version
GNU find version 4.3.8
Built using GNU gnulib version 2007-05-26
Features enabled: O_NOFOLLOW(enabled) LEAF_OPTIMISATION FTS() CBO(level=0)

So the problem may have been resolved as we moved to the newer gnulib implementation of fts.  Also, compare this to bug #15384.

Eric Blake <ericb>
Group administrator
Fri 18 May 2007 04:25:47 PM UTC, original submission:  

The following transcript shows a subtle way to get a disappointing surprise from the find command. I'll explain my complaint after showing you what happens:
=========================================================
nifty > pwd
/nfs/loew
nifty > find /mnt
/mnt
/mnt/cf
/mnt/cf1
nifty > su
Password:
nifty loew # find /mnt
find: cannot get current directory: Permission denied
nifty loew # echo $?
1
nifty loew # cd
nifty ~ # find /mnt
/mnt
/mnt/cf
/mnt/cf1
nifty ~ # exit
=========================================================
Commentary: I'm user 'loew', sitting at my office desk in front of a workstation named 'nifty'. The machine is running linux, and I administer it myself. My home directory is kept down the hall on some central server, and mounted using NFS. The server admin has wisely turned on the root-squash option. That means that user 'root' on a local box (like mine) does not get unlimited access to the nfs partition. In fact, 'root' gets no access at all!

Running find as a non-privileged user in my (NFS-mounted) home directory uses my workstation's own find binary to look at my workstation's internal filesystem and gives the expected results. Fine.

Switching to user 'root' from my home directory puts me in an unusual situation: thanks to NFS security, user 'root' does not have access to the current directory!

My complaint: this unusual situation makes find behave badly. I ask find to look for files in a directory where user 'root' has plenty of access, and find never gets up enough confidence even to try. I can imagine no good reason for this premature failure. Find should try; it would succeed!

Having user 'root' switch to some other directory, like /root, mounted on the local box, restores expected operation for find.

(Find is so important that this issue breaks some important public-domain scripts. E.g., Gentoo Linux's rather central 'revdep-rebuild'.)

Thanks for looking into this.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jay (Posted a comment)
  • -email is unavailable- added by ericb (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-12-19 jay Assigned toNone jay
        Open/ClosedOpen Closed
        Fixed ReleaseNone 4.3.12
    2007-08-22 ericb StatusNone Need Info

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code