puterboy has asked for the wisdom of the Perl Monks concerning the following question:
The other user *does* have full rwx access to *all* the directories in the @directories_to_search list.
However, I keep getting the error:
Can't cd to /home/present_working_directory: Permission denied
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Why does File::Find try to chdir to $PWD (and fail) even if $PWD is not itself in search list?
by ikegami (Patriarch) on Nov 24, 2008 at 17:38 UTC | |
|
Re: Why does File::Find try to chdir to $PWD (and fail) even if $PWD is not itself in search list?
by mr_mischief (Monsignor) on Nov 24, 2008 at 17:47 UTC | |
by puterboy (Scribe) on Nov 26, 2008 at 07:24 UTC | |
by mr_mischief (Monsignor) on Nov 26, 2008 at 15:45 UTC | |
|
Re: Why does File::Find try to chdir to $PWD (and fail) even if $PWD is not itself in search list?
by JavaFan (Canon) on Nov 24, 2008 at 17:09 UTC |