Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IIS - 401.3 - Unauthorized

Tags:

iis

iis-7

I am trying to get started with using IIS. I created a new site on IIS Manager, mapped it to a folder on my file system and added index.html to the folder. I have set the port to 85 for this site. When I try to access http://localhost:85/index.html, I get the following error message:

401.3 - unathorized - You do not have permission to view this directory or page because of the access control list (ACL) configuration or encryption settings for this resource on the Web server.

I gave read access to everybody on the folder and tried again. I could then access the page.

I then compared the properties of my folder with that of wwwroot. I found that wwwroot had read access on IIS_IUSRS...When I did the same on my folder and tried again, I got the above error again. I checkedthat anonymous access is enabled by default, but I still get this error.

Why does this happen? What is the correct way to resolve the problem?

like image 831
Aadith Ramia Avatar asked Oct 03 '13 15:10

Aadith Ramia


People also ask

How do you remove 401 unauthorized access is denied due to invalid credentials?

In the Manager central pane, double-click the Authentication option under IIS block. In the Authentication list, enable either Windows Authentication option or Basic Authentication, and disable all other authentication options.

What is Iusr in IIS?

What is IUSR in IIS? By default, a new site in IIS utilizes the IUSR account for accessing files. This account is a built-in shared account typically used by IIS to access file content. This means that it will use the application pool's identity (user) to access file content.


2 Answers

I have struggled on this same issue for several days. It can be solved by modifying the security user access properties of the file system folder on which your site is mapped. But IIS_IUSRS is not the only account you must authorize.

  • In IIS management console, in the Authentication part of the configuration of your site, modify the "Anonymous authentication" line and check the account set as "Specific user" (mine is IUSR).
  • Give read and execution permission on the folder of your site to the account listed as the specific user.

OR

  • In IIS management console, in the Authentication part of the configuration of your site, modify the "Anonymous authentication" line by selecting "Identity of the application pool" instead of "Specific user".
like image 56
groch Avatar answered Oct 25 '22 16:10

groch


Here is what worked for me.

  1. Set the app pool identity to an account that can be assigned permissions to a folder.
  2. Ensure the source directory and all related files have been granted read rights to the files to the account assigned to the app pool identity property
  3. In IIS, at the server root node, set anonymous user to inherit from app pool identity. (This was the part I struggled with)

To set the server anonymous to inherit from the app pool identity do the following..

  • Open IIS Manager (inetmgr)
  • In the left-hand pane select the root node (server host name)
  • In the middle pane open the 'Authentication' applet
  • Highlight 'Anonymous Authentication'
  • In the right-hand pane select 'Edit...' (a dialog box should open)
  • select 'Application pool identity'
like image 32
barrypicker Avatar answered Oct 25 '22 16:10

barrypicker