Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Greetings Monks, I'm developing a group of perl scripts that basically walk a user through setting up a website using flat file databases. (MySQL will come later) The basic command line scripts work just fine, but when I run it all through a web server, the script cannot open(FILE, ">MyFile"); My suspicion is that the script does not have permissions to create files when called by the web server. I think I need to know how to have perl use sudo, but I may be completely off course. Ether way, I can't seem to get it to work. I've been looking all day and have not had any luck in finding the solution to this problem. Any and all help is appreciated, and thank you!
... sub WebPassWrite { my $Pass = shift; open(PAS, ">hf"); print PAS $Pass; close(PAS); my $HTML =""; $HTML .= "Password Stored<br><div class=\"MenuItem\" " ."onclick=\"SetupPassCheck(['Page'],['Title','Content'])\">" ."Continue</div>"; return $HTML; } ...
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: CGI script cannot create file.
by Utilitarian (Vicar) on Dec 18, 2012 at 08:55 UTC | |
Re: CGI script cannot create file.
by Anonymous Monk on Dec 18, 2012 at 08:37 UTC | |
by Anonymous Monk on Dec 18, 2012 at 10:22 UTC | |
by Utilitarian (Vicar) on Dec 18, 2012 at 10:34 UTC | |
by Anonymous Monk on Dec 18, 2012 at 11:17 UTC | |
Re: CGI script cannot create file.
by bart (Canon) on Dec 18, 2012 at 11:28 UTC | |
Re: CGI script cannot create file.
by GrandFather (Saint) on Dec 18, 2012 at 21:31 UTC | |
Re: CGI script cannot create file.
by blue_cowdawg (Monsignor) on Dec 18, 2012 at 15:05 UTC | |
by Anonymous Monk on Dec 20, 2012 at 03:02 UTC | |
by blue_cowdawg (Monsignor) on Dec 21, 2012 at 13:24 UTC |