Setting Windows File Permissions  

Note: These instructions are intended for System Administrators only.

When Windows executes Perl scripts through the Web Server (IIS) it runs them under a special user account called IUSR_SERVERNAME where SERVERNAME is the name of your server. In order for the perl scripts to be able to create and update their data files, this user needs to have the appropriate permissions (as indicated in the install guide) over the scripts data files and directories.

Make sure you are running perl 5.004 or better. If you are not sure which version you have, run the script at the bottom of this page. The latest version of Perl for Windows can be downloaded from

1. First of all, make sure you are logged as an administrator.

2. Open windows explorer. Click Start -> Run -> type Explorer

3. Find the directory where the scripts and data files are located. If you are not sure where these files are you can run the script at the bottom of this page and it will display the full directory and path where it is installed.

4. For each file and directory, right click on it, select Properties and click on the Security tab.

NOTE: If the security tab is not displayed make sure you haven't selected multiple files and directories at the same time. You can only change security on objects of the same type (files or directories). Be sure to modify each separately.

5. For each file and directory, add or update the IUSR_SERVERNAME user and change their permission setting accordingly. Be sure to change permissions on all data files, directories, and HTML files that need to be updated. If you only modify some of the files the program may not function properly.

6. Run the program through your browser and make sure it doesn't display any error messages to ensure that all the permissions have been changed correctly.


The following perl script will display the perl version, full path to the cgi script, and the user account that windows executes scripts with. Copy or upload this script onto your web server and run it through your browser.

Note: If you are logged into a password protected page the username you are logged in with will be displayed, so ensure you are viewing a non-password protected page when running the program.

# winfo.cgi
#   display perl version,
#   script path, and account name

use Win32;
print "Content-type: text/html\n\n";
print "This is perl version $]<br>\n";
print "The path to this file is $0<br>\n";
print "Perl runs under the user account: ";
print Win32::LoginName();