No, the directory is right, and does exist, with the correct permissions. Further investigation has shown that the Perl routine Profile.pl will run correctly, and open the avatar directory, when not run from the Web as a .cgi script. Yet the permissions seem correct. So I'm at a loss as to why the call to opendir fails.