简体   繁体   中英

Create an IIS7 user and allow access to directory?

I am running IIS 7 on Windows Server 2003. I am more of an Apache user, so please forgive me.

I need to password-protect a directory on my server to allow only one user to access it via http. A simple 401 challenge is fine.

I've googled this task and they all say to begin double-clicking the "IIS Users" icon in IIS manager. I launched IIS manager via RDP and do not see this icon. (see screenshot)

So how to proceed?

If the user existed, I know how to select the directory and allow access only to that user -- so the question is how to make this user.

在此处输入图片说明

You need to create the user under Computer Management and assign the permissions in Windows Explorer. All you would need to do in IIS is make sure you have Windows Authentication turned on, and Anonymous Authentication turned off. So, here's the steps:

  1. Under Control Panel > Administrative Tools > Computer Management. Expand Local Users and Groups > Users > Right Click > New User.

  2. Under Windows Explorer, navigate to the folder you want to secure. Right click on it > Properties > Security Tab > Edit > Add. Give your new user at least Read/Execute permissions to the folder.

  3. Under IIS, expand on your website and select the folder that you want to protect. Then click the Authentication icon. Make sure Windows Auth is on and Anon Auth is off.

That should do it. Your browser should now give you the auth challenge when you try to browse to that folder.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM