Re: mkdir in cgi-script

2002-01-21 Thread Curtis Poe
--- "Randal L. Schwartz" <[EMAIL PROTECTED]> wrote: > > "Rene" == Rene Verharen <[EMAIL PROTECTED]> writes: > > Rene> The (sub)dirs I want to create are input from a form, so I had to > Rene> change your example a little because > > Rene> my @dir=qw($FORM{'dir'}); > > No no no! This is

Re: mkdir in cgi-script

2002-01-20 Thread Randal L. Schwartz
> "Rene" == Rene Verharen <[EMAIL PROTECTED]> writes: Rene> The (sub)dirs I want to create are input from a form, so I had to Rene> change your example a little because Rene> my @dir=qw($FORM{'dir'}); No no no! This is a security hole, unless you've also validated the data using code y

Re: mkdir in cgi-script

2002-01-20 Thread Randal L. Schwartz
> "Roger" == Roger C Haslock <[EMAIL PROTECTED]> writes: Roger> In this case I think you drop into shell Roger> `mkdir -p $fullpath`; This is dangerous, unportable, and far less efficient than necessary. See "perldoc File::Path", which I found by looking in the standard library using "perld

Re: mkdir in cgi-script

2002-01-20 Thread Roger C Haslock
In this case I think you drop into shell `mkdir -p $fullpath`; # And check for errors!!! - Roger - - Original Message - From: "Rene Verharen" <[EMAIL PROTECTED]> To: "Beginners-CGI List" <[EMAIL PROTECTED]> Sent: Saturday, January 19, 2002 5:01 PM Sub

Re: mkdir in cgi-script

2002-01-20 Thread Rene Verharen
At 19-1-2002 15:29 -0600, Shawn wrote: >Try something like this: > >my $string=$homDir; >my @dir=qw(directory somedir someotherdir yetanotherdir); >for(@dir) { > $string.=$_; > mkdir $string, 0755; >} > >untested Tested and approved, but... The (sub)dirs I want to create are input from a fo

mkdir in cgi-script

2002-01-19 Thread Rene Verharen
Hi, Can someone please point me in the right direction ? In a script I'm trying to write I need to create a new directory. This new directory looks something like /directory/somedir/someotherdir/yetanotherdir. What I do now is : mkdir "$homeDir/directory", 0755"; mkdir "$homeDir/dire