PDA

View Full Version : Creating Root Folders



kgkia33
September 17th, 2002, 16:57
In CuteFTP (If not able to do in CuteFTP but is in some other client, let me know) is it possible to make a cgi-bin (or perl) as a root folder by creating a new folder? My host went down and hasn't sent up my cgi and perl folders yet. Thanks.

YUPAPA
September 17th, 2002, 17:22
This is the code to create a folder



#!/usr/bin/perl
use strict;

### CONFIG ###
my $base_dir = q(/home/sites/yourdomain.com/www);
my $folder = q(cgi-bin);
############

print "Content-Type: text/html\n\n";
mkdir("$base_dir/$folder",0755) or die print "Could not create folder: $!\n";

__END__


replace everything between 'q(' and ')'
That will create a folder /home/sites/yourdomain.com/www/cgi-bin
Try it!

kgkia33
September 17th, 2002, 20:06
Didn't work.

YUPAPA
September 17th, 2002, 20:08
so what's the problem?? did you edit the variables?? it should show an error if it doesn't work... if it creates a directory, you should get a blank screen...