in reply to Using a 2000 Box to Access an Include File from 2003

It depends on how you are running the CGI script on the Web server.

Typically, if you allow ANONYMOUS access to the CGI script, it runs under the ID IUSER_MachineName.
This user does NOT have access to network shares.

My suggestion is to turn OFF anonymous access, and let the user credentials come in either via integrated authentication, or basic.

There are other ways around this, once you understand the issue. One is to specify specific user credentials to the user script.

Note - I think this explains why the first script failed. The second one with LWP should have worked. The Event log, and IIS logs will provide more clues.

Offense, like beauty, is in the eye of the beholder, and a fantasy.
By guaranteeing freedom of expression, the First Amendment also guarantees offense.

  • Comment on Re: Using a 2000 Box to Access an Include File from 2003

Replies are listed 'Best First'.
Re^2: Using a 2000 Box to Access an Include File from 2003
by bkiahg (Pilgrim) on Jun 17, 2004 at 23:30 UTC
    I have anon access turned off and tried both Window digest and Integrated Authentication (preferred). I would like to stay away from having user credentials in the script itself, but if theres no other way then...

    Will check the logs for more info. Thanks.

    Update: Checked the logs and event viewer and theres nothing pertinent in there.
      OK - I think I know why the second script (with LWP) fails:

      You are accessing a file with a .inc extension - by default, the web server does not associate this extension with a MIME type, so it will give you some kind of error.

      To fix this, associate .inc with text/html - however - I must warn you that this is a security hazard, since users will now be able to view your .inc scripts.

      Accessing the file via \\Server\path should work - make sure you have escaped back-slashes. Try the "-e <Filename>" test to verify file existance, and print the file name to see if it does look like it is supposed to. Remember - if you use a drive-letter like \\Server\c$ , you need to escape the dollar-sign as well.

      sweetblood and others messages above also have valid points, but I have not seen your response to them.

      Offense, like beauty, is in the eye of the beholder, and a fantasy.
      By guaranteeing freedom of expression, the First Amendment also guarantees offense.