perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Murphy" <>
Subject Newbie question re: opendir
Date Wed, 25 May 2005 14:46:45 GMT

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

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 

opendir(DIR, '/usr/local/src/') or die ('Failed because of $!'); 


...[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.


View raw message