Why does File::Find try to chdir to $PWD (and fail) even if $PWD is not itself in search list?by puterboy (Beadle)
|on Nov 24, 2008 at 17:05 UTC||Need Help??|
puterboy has asked for the
wisdom of the Perl Monks concerning the following question:
I am running a routine su'd to another user that does not have access to $PWD.
The other user *does* have full rwx access to *all* the directories in the @directories_to_search list.
However, I keep getting the error:
The error seems to occur *after* the first run through \&wanted. So, it seems like it is trying to go (back?) to $PWD after it finishes going through \&wanted.
Note this error goes away if I run the routine from *any* directory that the su'd user can chdir to (even if that direcotry has nothing to do with the search list).
Am I missing something obvious here?
Note: I would prefer not to have to use the no_chdir option since I do want to chdir to directories where files are indeed found.
I tried googling but didn't find anything on this.