[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #19899] find fails when it encounters irrelevant restrictions on $P

From: anonymous
Subject: [bug #19899] find fails when it encounters irrelevant restrictions on $PWD
Date: Fri, 18 May 2007 16:25:48 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20061023 SUSE/ Firefox/


                 Summary: find fails when it encounters irrelevant
restrictions on $PWD
                 Project: findutils
            Submitted by: None
            Submitted on: Friday 05/18/2007 at 16:25 UTC
                Category: find
                Severity: 3 - Normal
              Item Group: Wrong result
                  Status: None
                 Privacy: Public
             Assigned to: None
         Originator Name: 
        Originator Email: address@hidden
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.3.2
           Fixed Release: None



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
nifty > pwd
nifty > find /mnt
nifty > su
nifty loew # find /mnt
find: cannot get current directory: Permission denied
nifty loew # echo $?
nifty loew # cd
nifty ~ # find /mnt
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

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.


Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]