# File Upload Configuration Script Version 4.01 # Created by Jeff Carnahan jeffc@terminalp.com # Created on: 4/8/95 Last Modified on: 08/07/96 11:20 # Scripts Archive: http://www.terminalp.com/scripts/ # # Copyright (C) 1996 - Jeffrey D. Carnahan # Copyright Information Can Be found in the attacted README file. # # --------------------------------------------------------------------- # Program Specific Quickie Notes: # * Make Sure The First Line Is Pointing To The Correct Location Of Perl. # * Make Sure This Program is chmodded with the permissions '755'. # # --------------------------------------------------------------------- # --------------------------------------------------------------------- # Don't Modify Anything Past This Line Unless You Know What Your Doing! # --------------------------------------------------------------------- # --------------------------------------------------------------------- # print <; chop ($input); $url = $input; print "\n\nWhat is The Complete Path used to access files\nin the directory you will be uploading files to?\n"; print " To find out this path, (if you don't already know it)\n"; print " press Control-Z now, and go into the directory you want\n"; print " uploaded files to reside in. In this directory, type 'pwd'\n"; print " at the unix prompt. The 'pwd' command returns the Complete Path\n"; print " to that directory.\n\n"; print " Note: ** There should be *NO* trailing forward-slash\n"; print " on this path!! **\n?"; $input = ; chop ($input); $path = $input; print "\n\nIs it ok to overwrite existing files?\n"; print " If a file exists already, should the script overwrite the\n"; print " current contents? (If This is set to 'NO' then the script will\n"; print " prompt the user for another filename)\n\n"; print " Please press 'Y' or 'N':\n?"; $input = ; chop ($input); if ($input =~ /[Yy]/) { $overwrite = 1; } else { $overwrite = 0; } print "\n\nCan The Uploaded File Be Named 'index.html'?\n"; print " Should the script allow people to upload files named\n"; print " 'index.html'?? (If This is set to 'NO' then the script will\n"; print " prompt the user for another filename)\n\n"; print " Please press 'Y' or 'N':\n?"; $input = ; chop ($input); if ($input =~ /[Yy]/) { $index_rename = 0; $rename_val = "none"; } else { $index_rename = 1; print "\n\nWhat should The Script rename it to??\n"; print " What should the script rename the file to, since\n"; print " it can't be named index.html?\n?"; $input = ; chop ($input); $rename_val = $input; } sub u { local($name) = getpwuid($_[0]); $name && "($name)";} sub g { local($name) = getgrgid($_[0]); $name && "($name)";} &u($<); $userid = $<; $groupid = $(+0, &g($(); print "\n\n\n\n\n\n\n\n\n"; print "Ok. Please Paste these variables over the ones in your upload.cgi script.\n\n"; print "# <------- Snip Here ------->\n"; print "\$userid = \"$userid\";\n"; print "\$groupid = \"$groupid\";\n"; print "\$url = \"$url\";\n"; print "\$path = \"$path\";\n"; print "\$overwrite = \"$overwrite\";\n"; print "\$index_rename = \"$index_rename\";\n"; print "\$rename_val = \"$rename_val\";\n"; print "# <------- Snip Here ------->\n"; print "\n\n"; exit;