You can try to change the permissions through the File Manager.
If that doesn't work, try putting this script in cgi-bin and run it from the web. Check the ownership of the files you are having problems with.
Code:
#! /usr/bin/perl
use CGI::Carp qw(fatalsToBrowser);
my $dir = `ls -l` ;
print "Content-type: text/html\n\n";
print "<html>\n";
print "<head><title>Contents of...</title></head>\n";
print "<body>\n";
print "<h2>Contents of ...</h2> <br /> \n";
print "<br /> ... <pre> " ;
print $dir ;
print "</pre><br /> ... " ;
print "</body></html>" ;