IIS question (IIS is being reluctant)

First, here is some background information. I am currently trying to help someone implement a database driven web site running on IIS. I have used Apache in the past, but I’m completely new to IIS.

Here is the problem. There are two computers. The first is the web server with Windows 2000 Server and IIS. The second is also running Windows 2000 Server plus a database (xbase) engine. The CGI’s executed by IIS for the web site connect to the database server. This works. The CGI’s will connect to the database server. However for cleanup and other administration, the CGI’s also need to be able to perform basic file functions on the database server.

There seems to be a rights issue somewhere. I can execute the CGI’s (they are executables, not scripts) from a command prompt on the IIS computer and they function correctly. In other words, the logged on account on the IIS machine has sharing rights to the database server folder in question. However, the same CGI does not function when called from IIS. Either there is some setting that isn’t right or the user that IIS is running as does not have access rights to the database server.

Another piece of information is that the folder that needs to be accessed on the database server currently is shared as Everyone having full rights.

(note: Yes, I do realize that this is probably giving some people fits as far as security issues go. That is really not the topic of this post.)

As I said before, I’m completely new to IIS. This same setup works perfectly with an Apache web server. How do I get this to work on IIS?

Any help is greatly appreciated.

Under the site properties in IIS, have you selected ‘scripts & executables’ under the site security settings? I don’t have IIS loaded on this box, and I’m not exactly a guru, but it should jump out at you if you right click the virtual directory, select ‘properties’ and then have a look at the ‘home directory’ tab.

Rogueracer,

irae has probably fingered your problem, but if that doesn’t work, be aware that IIS (v6.0 at least) does NOT execute cgis under the username it is logged in with.

There’s a special account whose default name is
IWAM_{computername} that they (and other out-of-process calls) run under. So if that account doesn’t exist or is locked out or lacks needed permissions then you’ll still be stuck. Try your cgi exe’s from the relevant directory using runas to impersonate IWAM_etc and see how that works.

There’s another account, by default named
IUSR__{computername} that’s used for inprocess calls when the web browser is not authenticated and the user in therefore anonymous.

I’m not 100% sure how these two accounts interact for an anonymous user and an out-of-process CGI script. So you might want to make sure both users can get to the dbserver.

Good luck.