Forum Moderators: coopster & phranque

Message Too Old, No Replies

Any IIS CGI experts?

Having some security/permissions issues

         

volatilegx

1:57 am on Jul 8, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I know that perl on IIS is kind of silly but I have this weird problem that I just can't figure out.

I wrote a script that creates a directory and then creates some files in that directory. On a Linux/Apache system it works fine.

On IIS, it won't create the directory, but if I create the directory manually before running the script, it does write the files into the directory.

It sounds like a security/permissions problem, but I have assigned the website "user" to have Administrators group privilidges, so how could it be a NFTS security problem?

I'm thinking maybe a different perl function is necessary to create a directory on IIS?

This one really has me pulling my hair out :)

lexipixel

12:33 am on Jul 9, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



On IIS, it won't create the directory, but if I create the directory manually before running the script, it does write the files into the directory.

If the script doesn't die (when it "doesn't create the directory"), have you checked to see if it created it somewhere other than where you expected?

Its been a while (on IIS), but I remeber some weird pathing problems.

Have you tested to see if it will create a directory in different paths, ie- will it create a sub-directory of the directory it runs in. Will it create a directory at the root level of the boot drive? Will it create a directory only in the web root or below?

I know this isn't an answer --- but it may help to determine if it's actaully a script, server, os or data / syntax problem if we knew it won't create ANY directory, or that it will but only in certain situations.

volatilegx

8:58 pm on Jul 13, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Good point, but yes, I did look in various locations, including a full drive search.

richlowe

9:57 pm on Jul 13, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I do run activeperl on my IIS server. I haven't tried doing what you're asking, but I would start by checking the event log to see if an error was generated when the perl script tried to create the directory. I would also check ACLs on the directory in which you were trying to create the directory. In other words, does the IIS anonymous user account have the privilege to create a directory. Also check paths.

I am not a perl scriptor, but there may indeed be a "create directory" function. Not sure about that, but a look at any perl book should be able to answer that question.

And I would say that if you are giving anonymous users browing your website admin privileges, you are basically opening up your server to any good or even not so good hacker.

Richard

richlowe

9:57 pm on Jul 13, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



And one more thing, activeperl runs very well on IIS and windows. It's not silly by any means.

volatilegx

4:51 am on Jul 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



> does the IIS anonymous user account have the privilege to create a directory.

Was the first thing I thought of, too, but the anonymous user account actually has full administrator privileges. Dangerous, I know, but this is only for development purposes. I only run IIS on this server when actually testing my code.

> And one more thing, activeperl runs very well on IIS and windows. It's not silly by any means.

True. I was just being a smartalec. Don't most folks use ASP or something similar for server side scripting on IIS? Personally, I prefer Perl, but then again I also prefer *nix servers.

Thanks for the suggestions, everybody.