Most of the virtual hosts are now disabled: FileSystemObject, because this component provides powerful file system access capabilities for ASP, read, write, copy, delete, rename, etc. Operation (of course, this means to do it under Windows NT / 2000 using the default setting). But after prohibiting this component, the consequences caused by all ASPs that use this component will not be able to run, and cannot meet the needs of customers. How to allow both FileSystemObject components, do not affect the security of the server (ie: Different virtual host users can not use the component to read and write the files)? Here is a method that I have obtained in the experiment, which is described below with Windows 2000 Server as an example. Open the resource manager on the server, right-click the drive letter of each hard disk partition or volume, select "Properties" in the pop-up menu, select the Security tab, you can see which accounts can be accessed to access this partition Volumes and access rights. After the default installation, "Everyone" has full control. Add "Administrators", "Backup Operators", "Power Users", "Users", etc., and give "full control" or corresponding permissions, pay attention, do not give "Guests" group, "IUSR_ machine name" these accounts any permissions. Then, "Everyone" group is then deleted from the list, so that only authorized groups and users can access this hard disk partition, and when the ASP is executed, it is access to the hard disk as "IUSR_ machine name", this is not given here User account permissions, ASP can also read and write files on the hard disk. The following is to set a separate user account to each virtual host user, and then assign each account to a directory that allows its fully controlled. As shown in the figure below, open "Computer Management" → "Local User and Group" → "User", click the right mouse button in the right column, select "New User" in the pop-up menu:
In the "New User" dialog box in the pop-up, "User Name", "Full Name", "Description", "Password", "Confirm Password" are entered according to actual needs, and the "user must change the password next time" The right pair is removed, and "the user cannot change the password" and "password never expire". This example is a built-in account "IUSR_VHOST1" to establish an anonymous access Internet information service to the user of the first virtual host, ie: all clients use http: //***.***. When hosting, it is accessed in this identity. Enter the completion of the "creation". You can create multiple users according to actual needs, and after the creation is complete, "Close":
Now the newly established user has appeared in the account list, double-click the account in the list to further set:
In the pop-up "IUSR_VHOST1" (ie, the new account that is just created) Properties dialog box is "belonging to" tab:
The original account is default that belongs to the "User" group, selecting the group, point "delete":
Now, as shown in the figure below, then "Add" again:
Find "Guests" in the "Select Group" dialog box that pops up, click "Add", this group will appear in the text box below, then click "OK":
The appearance is the content shown below, click "OK" to close this dialog box:
Open "Internet Information Service" and start setting the virtual host. In this example, the "First Virtual Host" setting will be described as an example, right-click the host name, select "Properties" in the pop-up menu: Pop up one The "First VC Properties" dialog box, from the dialog box you can see the "F: / Vhost1" folder: F: / vhost1 ":
For the time being, no matter what the "First Virtual Host Property" dialog, switch to "F: / Vhost1" (the original is single to modify this directory, I think it is still the entire disc EVERYO permission Go, add the administrators group, better) this folder, right click, select the "Properties" → "Security" tab, you can see the default security settings of the folder is "Everyone" full control (depending on the situation) The displayed content is not exactly the same), first "allowing the inheritance of the inherits from the parent to the object to the object" to remove:
The "administrator" (original written written as the original written, which should be an administrator "shown in the figure, is better) and the new account" IUSR_VHOST1 "created in front, will give full control permissions, You can add other groups or users according to actual needs, but do not add "guests" groups, "IUSR_ machine name" to add accounts to these anonymous access!
Switch to the previously opened "First Virtual Host Properties" dialog, open the "Directory Security" tab, "edit": "Edit":
In the "Verification Method" other box (shown below), click "Edit":
The "Anonymous User Account" popped up, the default is "IUSR_Merical Name", click "Browse":
Find the new account "IUSR_VHOST1" created in the "Select User" dialog box, double click:
At this point, the anonymous username is changed, and when entering the previous creation in the password box, the password set for the account:
Determine the password again:
OK, complete, click OK to close these dialogs. After this setting, the "first virtual host" user uses the ASP's FileSystemObject component to access its own directory: F: / vhost1, when trying to access other content, there will be, such as "no permissions", "The hard disk is not ready", "500 server internal error" and other errors prompts. Another: If the user needs to read the partition capacity of the hard disk and the serial number of the hard disk, the setting will not be read. If you want to read these and the entire partition related content, right click on the partition (volume) of the hard disk, select "Properties" → "Security", add this user's account to the list, and give at least "read "Permissions. Since the subdirectory under this volume has been set to "Prohibit the transfer of the inheritance rights from the parent to this object", the permission settings of the subdirectory below are not affected.