IIS8의 IIS_IUSRS 및 IUSR 권한
ASP.NET 응용 프로그램을 호스팅하기 위해 Win2003의 IIS6에서 Win2012의 IIS8로 이동했습니다.
내 응용 프로그램의 특정 폴더 내에서 파일을 만들고 삭제해야합니다. 파일을 새 서버에 복사 한 후 파일을 삭제하려고 할 때 다음 오류가 계속 발생했습니다.
'D : \ WebSites \ myapp.co.uk \ companydata \ filename.pdf'경로에 대한 액세스가 거부되었습니다.
IIS를 확인하면 응용 프로그램이 DefaultAppPool 계정으로 실행되고 있음을 알지만 IIS AppPool \ DefaultAppPool 을 포함하도록이 폴더에 대한 Windows 권한을 설정하지 않았습니다.
대신 고객의 비명을 막기 위해 폴더에 대해 다음 권한을 부여했습니다.
IUSR
- 읽기 및 실행
- 폴더 내용 나열
- 읽다
- 쓰다
IIS_IUSRS
- 수정
- 읽기 및 실행
- 폴더 내용 나열
- 읽다
- 쓰다
이것은 효과가있는 것 같지만 너무 많은 권한이 설정되어 있는지 걱정됩니다. IUSR 이 실제로 필요한지 여부에 대한 온라인 상충되는 정보를 읽었습니다 . 누구든지이 폴더에서 문서를 만들고 삭제하기에 충분한 사용자 / 권한을 명확히 할 수 있습니까? 또한 IUSR은 IIS_IUSRS 그룹의 일부입니까?
업데이트 및 솔루션
아래 내 답변을 참조하십시오 . 최근의 제안이 잘 생각되지 않았거나 심지어 안전하지 않기 때문에 슬프게도해야했습니다 (IMO).
나는 내 자신의 답변을 게시하는 것을 싫어하지만 최근 일부 답변은 내 자신의 질문에 게시 한 솔루션을 무시하여 어리석은 접근 방식을 제안합니다.
즉, Windows 사용자 계정 권한을 전혀 편집 할 필요가 없습니다 . 그렇게하는 것은 위험을 초래할뿐입니다. 프로세스는 상속 된 권한을 사용하여 IIS에서 완전히 관리됩니다.
올바른 사용자 계정에 수정 / 쓰기 권한 적용
도메인이 사이트 목록에 표시되면 마우스 오른쪽 버튼을 클릭하고 권한 편집을 선택합니다.
보안 탭 아래에
MACHINE_NAME\IIS_IUSRS
표시됩니다. 이는 IIS가 디렉토리에 대한 읽기 전용 권한을 자동으로 갖음을 의미합니다 (예 : 사이트에서 ASP.Net을 실행하는 경우). 이 항목을 편집 할 필요는 없습니다 .편집 버튼을 클릭 한 다음 추가 ... 를 클릭 하십시오.
입력란에을 입력
IIS AppPool\MyApplicationPoolName
하고MyApplicationPoolName
도메인 이름으로 대체 합니다 (예 :IIS AppPool\mydomain.com
Press the Check Names button. The text you typed will transform (notice the underline):
Press OK to add the user
With the new user (your domain) selected, now you can safely provide any Modify or Write permissions
IUSR is part of IIS_IUSER group.so i guess you can remove the permissions for IUSR without worrying. Further Reading
However, a problem arose over time as more and more Windows system services started to run as NETWORKSERVICE. This is because services running as NETWORKSERVICE can tamper with other services that run under the same identity. Because IIS worker processes run third-party code by default (Classic ASP, ASP.NET, PHP code), it was time to isolate IIS worker processes from other Windows system services and run IIS worker processes under unique identities. The Windows operating system provides a feature called "Virtual Accounts" that allows IIS to create unique identities for each of its Application Pools. DefaultAppPool is the by default pool that is assigned to all Application Pool you create.
To make it more secure you can change the IIS DefaultAppPool Identity to ApplicationPoolIdentity.
Regarding permission, Create and Delete summarizes all the rights that can be given. So whatever you have assigned to the IIS_USERS group is that they will require. Nothing more, nothing less.
hope this helps.
When I added IIS_IUSRS permission to site folder - resources, like js and css, still were unaccessible (error 401, forbidden). However, when I added IUSR - it became ok. So for sure "you CANNOT remove the permissions for IUSR without worrying", dear @Travis G@
@EvilDr You can create an IUSR_[identifier] account within your AD environment and let the particular application pool run under that IUSR_[identifier] account:
"Application pool" > "Advanced Settings" > "Identity" > "Custom account"
Set your website to "Applicaton user (pass-through authentication)" and not "Specific user", in the Advanced Settings.
Now give that IUSR_[identifier] the appropriate NTFS permissions on files and folders, for example: modify on companydata.
IIS_IUSRS group has prominence only if you are using ApplicationPool Identity. Even though you have this group looks empty at run time IIS adds to this group to run a worker process according to microsoft literature.
I would use specific user (and NOT Application user). Then I will enable impersonation in the application. Once you do that whatever account is set as the specific user, those credentials would used to access local resources on that server (Not for external resources).
Specific User setting is specifically meant for accessing local resources.
참고 URL : https://stackoverflow.com/questions/14934006/iis-iusrs-and-iusr-permissions-in-iis8
'Programing' 카테고리의 다른 글
면도기에서 "Html.BeginForm"을 작성하는 방법 (0) | 2020.07.01 |
---|---|
AppDomain이란 무엇입니까? (0) | 2020.07.01 |
동시 해시 세트 (0) | 2020.07.01 |
Github 리포지토리에서 "git update-server-info를 실행 했습니까?"오류 (0) | 2020.07.01 |
C ++ 정적 가상 멤버? (0) | 2020.07.01 |