all groups > iis security > april 2005 >
You're in the

iis security

group:

IIS folder structure and security.



IIS folder structure and security. edroszcz NO[at]SPAM gmail.com
4/15/2005 3:26:17 PM
iis security: Hi,

Been browsing for some information about how I should organize our
Windows 2003 servers running IIS6. Whith organize I mean which folder
structure we should use and to to make it secure.

The structure I have atm looks like this:

D:\Websites
..=2E.
D:\Websites\domain1.com
D:\Websites\domain1.com\www
D:\Websites\domain1.com\db
..=2E.
D:\Websites\domain2.com
D:\Websites\domain2.com\www
D:\Websites\domain2.com\db

and so on for each domain on the server.

In the IIS each site have it's root to the 'www' folder. I.e the site
for the domain domain1.com points to the folder
D:\Websites\domain1.com\www.

The server is a shared webhosting server with all kinds of customers
with different domains. I dont use the IIS FTP so I dont have to worry
that users can change/delete files from other users directories that
way.

But what I wonder is, can the user with domain1.com execute a script
that he put in D:\Websites\domain1.com\www that in some way could
access the files in D:\Websites\domain2.com\www?

If so, which would be the best way to fix this? Do I have to create
Windows accounts and set NTFS permissions on each customers folder?

Any id=E9as, comments or thoughts on this would be appreciated.

Best regards
Erik Droszcz
Re: IIS folder structure and security. Jason Brown [MSFT]
4/16/2005 12:00:00 AM
Yes, it's possible, with a lax NTFS security scheme, for a user of site1 to
access files in other sites with, say, FileSystemObject. This could lead to
some shenanigans.

The way I'd deal with this would be to add a unique user account for each
separate user, and a group which you can add the users to for blanket
permissions. then make sure only the appropriate user account has rights on
their set of folders. If they then tried to cross the boundary into another
site, they'd immediately be denied.

It sounds hard to set up at first, but once you get going with it it's
really not too hard.


--
Jason Brown
Microsoft GTSC, IIS

This posting is provided "AS IS" with no warranties, and confers no rights.



[quoted text, click to view]
Hi,

Been browsing for some information about how I should organize our
Windows 2003 servers running IIS6. Whith organize I mean which folder
structure we should use and to to make it secure.

The structure I have atm looks like this:

D:\Websites
....
D:\Websites\domain1.com
D:\Websites\domain1.com\www
D:\Websites\domain1.com\db
....
D:\Websites\domain2.com
D:\Websites\domain2.com\www
D:\Websites\domain2.com\db

and so on for each domain on the server.

In the IIS each site have it's root to the 'www' folder. I.e the site
for the domain domain1.com points to the folder
D:\Websites\domain1.com\www.

The server is a shared webhosting server with all kinds of customers
with different domains. I dont use the IIS FTP so I dont have to worry
that users can change/delete files from other users directories that
way.

But what I wonder is, can the user with domain1.com execute a script
that he put in D:\Websites\domain1.com\www that in some way could
access the files in D:\Websites\domain2.com\www?

If so, which would be the best way to fix this? Do I have to create
Windows accounts and set NTFS permissions on each customers folder?

Any idéas, comments or thoughts on this would be appreciated.

Best regards
Erik Droszcz

Re: IIS folder structure and security. Jason Brown [MSFT]
4/16/2005 12:00:00 AM
nope, an ISAPi filter wouldn't be any good. it operates in the wrong layer

you can change the app pool identity, i.e. have w3wp.exe running under
different accounts.


--
Jason Brown
Microsoft GTSC, IIS

This posting is provided "AS IS" with no warranties, and confers no rights.

[quoted text, click to view]
| Ok, I was hoping this could be done without the need to create actual
| Windows accounts. It would be so sweet if it could done some other way.
| Maby with some ISAPI filter for the IIS that would block scripts to
| access resources outsite it's on directory.
|
| But even if you would create separate users for each website, the
| w3wp.exe process is still run under the same user for all websites. I
| am not really sure exactly what that user have access to. But is there
| any chance scripts can gain access to files outside it's own directory
| since all sites use w3wp.exe?
|

Re: IIS folder structure and security. edroszcz NO[at]SPAM gmail.com
4/16/2005 1:48:50 AM
Ok, I was hoping this could be done without the need to create actual
Windows accounts. It would be so sweet if it could done some other way.
Maby with some ISAPI filter for the IIS that would block scripts to
access resources outsite it's on directory.

But even if you would create separate users for each website, the
w3wp.exe process is still run under the same user for all websites. I
am not really sure exactly what that user have access to. But is there
any chance scripts can gain access to files outside it's own directory
since all sites use w3wp.exe?
Re: IIS folder structure and security. edroszcz
4/17/2005 5:43:38 AM
Ohh, ok.

Well, thanks for your comments!

You know how webhosting companies usualy handle this (that run Windows
server and IIS that is)? I mean, most companies have some kind of
administration system that adds/removes the websites on the server
itself. I wonder if they also create a separate Windows user account
for each new IIS website they add.

Do you know anything about it?
Re: IIS folder structure and security. Chris Bell
4/18/2005 1:16:02 AM
For security when hosting multiple customer sites, you can assign a unique
user to act as the anonymous account for each site. Then you ACL with that
unique anonymous account and get the seperation. You can set AppPools to
run under a different identity as well..

-Chris

[quoted text, click to view]
Re: IIS folder structure and security. Savas
4/20/2005 12:35:01 AM
I should have read this before posting; is there a through documentation
available on setting up unique accounts and not letting them access other
folders?

[quoted text, click to view]
Re: IIS folder structure and security. jeff.nospam NO[at]SPAM zina.com
4/20/2005 5:56:42 PM
On Wed, 20 Apr 2005 00:35:01 -0700, "Savas"
[quoted text, click to view]

That's basic Windows security, not limited to IIS so a decent Windows
administration book should cover it. Also take a look at:

http://www.microsoft.com/serviceproviders/microsoftsolutions/sharedhostingguide.asp
http://www.microsoft.com/serviceproviders/webhosting/default.asp

And the forums l,ocated there and at asp.net.

Jeff


[quoted text, click to view]
AddThis Social Bookmark Button