G
Guest
I need to create a file on a web server (running unix) and set its permission so
that no-one, except with correct ftp username & password can download or view it.
On my wwww server I've created test.pl. When I go to
www.notareal.com/cgi-bin/test.pl
Firefox shows "Hello world" as expected. When I use a FTP program the check if
newtext.tx has been created it's there OK.
The problem is that I cannot download the newtext.txt or view it. I can delete it
but that's just about it.
Here is a simple test.pl:
#!/usr/bin/perl
print "Content-Type: text/html; charset=iso-8859-1\n\n";
print '<html><BODY>';
open(TEKSTI,">newtext.txt");
print TEKSTI "just testing";
close(TEKSTI);
chmod 0600,"newtext.txt"; ## The problem line
print "Hello world</body> </HTML>";
If I leave out the problem line everything works but the file is set as 644 and
not 600. Can I leave it as 644? Can someone without user name and password still
access it from browsers or other program?
I tried this on another www page and it worked there ok.
that no-one, except with correct ftp username & password can download or view it.
On my wwww server I've created test.pl. When I go to
www.notareal.com/cgi-bin/test.pl
Firefox shows "Hello world" as expected. When I use a FTP program the check if
newtext.tx has been created it's there OK.
The problem is that I cannot download the newtext.txt or view it. I can delete it
but that's just about it.
Here is a simple test.pl:
#!/usr/bin/perl
print "Content-Type: text/html; charset=iso-8859-1\n\n";
print '<html><BODY>';
open(TEKSTI,">newtext.txt");
print TEKSTI "just testing";
close(TEKSTI);
chmod 0600,"newtext.txt"; ## The problem line
print "Hello world</body> </HTML>";
If I leave out the problem line everything works but the file is set as 644 and
not 600. Can I leave it as 644? Can someone without user name and password still
access it from browsers or other program?
I tried this on another www page and it worked there ok.