cd ~/webroot chmod u=rwx,go=rx . mkdir test cd test chmod u=rwx,go=r . echo "
Nothing here." >index.html chmod ugo=r index.html mkdir hades chmod u=rw,go=r hades cd .. mkdir cgi-bin cd cgi-bin chmod u=rwx,go=rx . ####
print "Content-type: text/html\r\n\r\n\n";
print "$< $> $( $) $^X $] $0\n";
print join(":",getpwuid($<)),"\n";
print "$ENV{PATH}\n";
print `/bin/pwd`; # Not for Win32
#OR# print Win32::getcwd(),"\n"; # For Win32
print "\n";
exit(0);
####
print "Content-type: text/html\r\n\r\n\n";
if( ! chdir("~joe/webroot") ) {
print "Can't chdir to ~joe/webroot: $!\n";
} elsif( ! open(TEST,"> hades/emptytest",0777) ) {
print "Can't create emptytest: $!\n";
} else {
close(TEST);
}
print "\n";
exit(0);