Files Existing on Server Produce 404 Error -- IIS 6 Migrated from Linux

freighttrain's picture

I have a Drupal 6 install on IIS 6 (Windows 2003) that was recently migrated from Linux. We implemented with FastCGI so we could use CleanURLs. Just about everything is working with one exception. I have a content type that uses filefield field in the CCK. For some reason, I get a 404 error when trying to click on the links for these files. I've checked that files are publicly available in the file permission admin screen, have checked that they are in the directory they should be in with FTP (they are), and have even looked at the file names and the file paths in the database table and this is correct as well. Drupal produces a 404 error no matter what.

The IIS 6 Server does not recognize .htaccess I presume, but I have also put .htaccess files in root, in the /files directory, and in the directory where I cannot get to the files, which is /files/maps. This does not seem to help.

There might possible be a permission/ownership problem and the FTP client's chmod window comes up as xxx on all files that have been uploaded, including the ones I can get to in the /files directory. I think this is not the problem, just that the server does not allow chmod.

I am at such a loss and this is a production site. Any thouhghts?



Couple of ideas for you

markjbrown's picture

There are a couple of articles you should check out that might help you with this.

The first one is That should help you with migrating htaccess to web.config on IIS.

The second is this article here, There are a couple of articles within this link that go into detail permissions for content on IIS. I suspect there may be a permissions issue at the heart of this.

btw, this URL here provides easy listing of all of the most recent articles for running php applications on IIS and is a great resource for php developers who are new to IIS or just have questions, good one to keep bookmarked for future reference.

Hope this is helpful. Let me know if it isn't and I can keep digging for you.


Thank you markjbrown. More

freighttrain's picture

Thank you markjbrown. More and more it has to be permissions. I've been looking for info on ISAPI rewrite and htaccess, but no help. The problem is that its IIS 6 and not IIS 7. I think they are very different. I am going to keep digging. I did note that when uploading files with Drupal the temp file gets created but cannot be moved to the directory I am specifying.

Some more help on IIS 6

markjbrown's picture

There are forums for IIS6 and I'm sure someone can help you there as well. check it out at

btw, if it's at all possible to migrate them to IIS 7 then go for it. The team completely rewrote IIS when they did v7. HUGE difference. For instance the URL Rewrite module for IIS7 can import mod_rewrite rules straight out of .htaccess making sure the rules come over exactly. Tons of other things they fixed as well. Completely different web server. Fixed a ton of stuff that drove me nuts about IIS :)


I really wish

freighttrain's picture

I had that option. Its an IT department at a large non-profit, and I have little control over what is installed. Thank you again for the information. I've been trying what I can find, but no luck thus far. If I come up with a solution I will post it here.