Hi all,
Could anyone shed some light on where I'm going wrong here?
So inside /public_html/cgi-bin/ there is a folder called test. In that folder there is a .pl script that contains the following:
When you visit the .pl script in the browser - The test.txt file isn't created. Although running the script as root on SSH does make script create the file.
Can anyone help with what is going wrong?
Could anyone shed some light on where I'm going wrong here?
So inside /public_html/cgi-bin/ there is a folder called test. In that folder there is a .pl script that contains the following:
Code:
#!/usr/bin/perl
print "Content-type: text/html\n\n";
open (TEST, ">>/home/$username/public_html/cgi-bin/test/test.txt");
print TEST "hello world\n";
close (TEST);
print "Script finished. Check if file exists.";
Can anyone help with what is going wrong?