kermada has asked for the wisdom of the Perl Monks concerning the following question:

I have a script that works interactively but not when done through the web. It reads a file on another computer. The script works if the file is local, just not remotely. Is this a perl cgi problem or IIS permissions problem? I'm using version 5.8.7. I've tried the if (-e $FileName) and it fails on any remote file. The remote directory has Everyone with full control. Even tried the remote directory mounted as a local drive, it fails also. What am I missing.

Replies are listed 'Best First'.
Re: CGI script on IIS
by NetWallah (Canon) on Jun 29, 2007 at 03:07 UTC
    Most likely, you have a permissions problem.

    You need to identify what User-ID the cgi script gets run by. Most likely, the ID is a local account named IUSER_<server-name>.

    This account needs to get rights to the files you are accessing. The alternative, is to run the cgi-script as another user, or to require user authentication, and use the authenticated user to run the script

    If the file you are accessing resides on another machine, you need to deal with the fact that the account IUSER-<computername> is a LOCAL account, that does not have network access.

    I suggest you talk with someone who has experience configuring applications in IIS. The majority of your question is off-topic for this site.

    Update 1: Fixed typo.

         "An undefined problem has an infinite number of solutions." - Robert A. Humphrey         "If you're not part of the solution, you're part of the precipitate." - Henry J. Tillman

      Yes, your right, it is off topic for the site. I was grabbing at straws at this point. I thought that the Everyone access would allow the IIS user to have access as well. I will work with the admin guys and see what can be done. Thanks for the prompt reply.