Forum Moderators: coopster & phranque

Message Too Old, No Replies

perl reading files in IIS

         

ppostma1

11:13 pm on Jan 9, 2004 (gmt 0)


I have been trying to get my perl scripts to execute in IIS. Everything works in linux apache, and when I moved them to IIS certain function stopped working. While I can get by without most of them, I really need my scripts to read local files.

For some reason, IIS will not allow perl to open files for any reason. My ISP is stumped as to why they don't have access. The simple line open(INPUT, "note.txt"); to print that data into the webpage fails every time. I do not know enough about IIS to tell them how to fix it (which is what it usually takes) and they obviously won't give me control of their computer to figure it out.

Can someone tell me what I need to do to enable reading, and preferably writing of files in perl under IIS?

ddoyle

6:32 pm on Jan 10, 2004 (gmt 0)

10+ Year Member



If this is the same problem I had, then the solution is that you need to set permissions on the file so that perl can read it, and you have to do this outside of IIS.

Go to the file you want and right click on it and choose properties. Go to the security tab and add the "Internet Guest Account" user to it and give it read permissions. That should work.

It's worse if you want to write a file, since you somehow have to put write permissions on a file that may not exist yet. Because of this, it may be easier to put the files you want to read or write in a seperate directory and then attach the user and permissions to that directory instead.