I've been assigned as the webmaster for my AFROTC detachment at New Mexico State U. I've been able to hold my own managing the existing HTML of the site however I have nil experience with scripting/coding and our perl script that handles our e-mail broadcast system recently has gone down.

I've been in communication with our the IT guys with the university and they've advised they've fixed issues with some modules that weren't installed and were blocking our script's functionality. I'm still getting errors when running the e-mail script though, unfortunately. (see here: http://web.nmsu.edu/~afrotc/cgi-bin/cadet_email.pl

this is the error that I receive in case the vpn doesn't let you guys access it...

Quote

Sorry, cannot open /home/canto8/~afrotc/public_html/tmp2/: No such file or directory Cannot close /home/canto8/~afrotc/public_html/tmp2/: Bad file descriptor

I thought it might be a simple fix with regard to creating/setting permissions of a public_html/tmp2 directory. No dice.

I've attached the perl script for our e-mail system here.. My request is more of a troubleshooting more than anything else, but if someone happens to append any improvements on what we have, we'd be most grateful.

I haven't tested your script (would have to create the HTML form etc), but the first thing that comes to mind is that "/home/canto8/~afrotc/public_html/tmp2/" isn't a valid path hence why it is unable to open the file. Are you sure this is the correct path, i.e. the tmp2 directory exists?

Your errors do not suggest that your permissions are incorrectly set, saying that, I may be wrong. Ill have a look around, but at this time I don't know what else to suggest. Hopefully another user may be able to aid you. If it is possible, could you provide your HTML form, then ill be able to quickly test your script. If your script runs fine for me, ill be able to inform you of my personal configuration.

I ran your script with no problems... - I use a linux shared web host (1and1). - Permissions of the pl script were "755". - Permissions of the directory where the file is being uploaded to were "644". - I ran the script from the same directory as the html page, using the Cwd module to automatically get the path for me, so that I didn't have to explicitly write it (my $FILE = getcwd().'/';).

On your side, your script runs with no problems, your errors relate to the opening of the file whilst uploading. I'm still wondering if its a path issue. If it were a permissions issue, you would recieve the error "Permission denied".