Newbie question re: opendir
[prev]
[thread]
[next]
[Date index for 2005/05/25]
Hi,
Please excuse the newbie-ish nature of this question, but I have
searched the mailing list archives and can't find an answer to my
question.
I've downloaded and installed LXR 0.9.4 on a Fedora Core 3 box to index
our source here at our company, and there's a problem when I run the
script named 'source' which tries to access a directory to list its
contents. The mod_perl version is 2.0.0 (I upgraded to see if that would
resolve the issue).
The script is failing on an opendir call, stating that permission was
denied. I've inserted some test code manually to try and confirm this
and it seems to conform to my theory.
Embedding the following line=20
opendir(DIR, '/usr/local/src/') or die ('Failed because of $!');=20
Gives
...[error] Can't open directory because of Permission denied.
If I run the same code from the command as both a root and non-root user
i.e. perl -Te " opendir(DIR, '/usr/local/src/') or die ('Failed because
of $!');" I see no errors. I've loosened the permissions on the entire
directory path to 777 to make sure that they're really is no permission
issue as well.
Looking through the archives for this list I've seem mails that mention
checking if calls to glob() fail in a similar fashion. I've check and
they don't - glob() works fine.
Cheers
=09
Paul
 |
Newbie question re: opendir
Paul Murphy 14:46 on 25 May 2005
|