IIS application pool access desktop denied
Here's an issue with IIS 7.5 and ASP.NET that I've been researching and getting nowhere with. Any help would be greatly appreciated.
My question is: using ASP.NET in IIS 7.5, how does IIS and/or the operating system allow the web application to write to a folder like
C:\dump
when running under full trust? How is it that I don't have to explicitly add write access for the application pool user (in this caseApplicationPoolIdentity
)?This much I know:
- In IIS 7.5, the default Identity for an Application Pool is
ApplicationPoolIdentity
.ApplicationPoolIdentity
represents a Windows user account called "IIS APPPOOL\AppPoolName", which is created when the Application Pool is created, where AppPoolName is the name of the Application Pool.- The "IIS APPPOOL\AppPoolName" user is by default a member of the
IIS_IUSRS
group.- If you are running under Full Trust, your web application can write to many areas of the file system (excluding folders like
C:\Users
,C:\Windows
, etc). For example, your application will have access to write to some folders, like,C:\dump
.- By default, the
IIS_IUSRS
group is not given read or write access toC:\dump
(at least not access that is visible through the "Security" tab in Windows Explorer).- If you deny write access to
IIS_IUSRS
, you will get a SecurityException when trying to write to the folder (as expected).So, taking all of that into account, how is write access granted to the "IIS APPPOOL\AppPoolName" user? The w3wp.exe process runs as this user, so what allows this user to write to a folder it doesn't seem to have explicit access to?
Please note that I understand this was probably done for the sake of convenience, since it would be a pain to grant a user access to every folder it needs to write to if you are running under Full Trust. If you want to limit this access, you can always run the application under Medium Trust. I am interested in finding out about the way the operating system and/or IIS allows these writes to take place, even though there appears to be no explicit file system access granted.
====
The ApplicationPoolIdentity
is assigned membership of the Users
group as well as the IIS_IUSRS
group. On first glance this may look somewhat worrying, however the Users
group has somewhat limited NTFS rights.
For example, if you try and create a folder in the C:\Windows
folder then you'll find that you can't. The ApplicationPoolIdentity
still needs to be able to read files from the windows system folders (otherwise how else would the worker process be able to dynamically load essential DLL's).
With regard to your observations about being able to write to your c:\dump
folder. If you take a look at the permissions in the Advanced Security Settings, you'll see the following:
See that Special permission being inherited from c:\
:
That's the reason your site's ApplicationPoolIdentity
can read and write to that folder. That right is being inherited from the c:\
drive.
====
In a shared environment where you possibly have several hundred sites, each with their own application pool and Application Pool Identity, you would store the site folders in a folder or volume that has had the Users
group removed and the permissions set such that only Administrators and the SYSTEM account have access (with inheritance).
You would then individually assign the requisite permissions each IIS AppPool\[name]
requires on it's site root folder.
You should also ensure that any folders you create where you store potentially sensitive files or data have the Users
group removed. You should also make sure that any applications that you install don't store sensitive data in their c:\program files\[app name]
folders and that they use the user profile folders instead.
So yes, on first glance it looks like the ApplicationPoolIdentity
has more rights than it should, but it actually has no more rights than it's group membership dictates.
IIS AppPool\LiveWebChat 需要注意的是,这里必须写完整的。只写一部分是找不到的,比如
IIS AppPool\Liv,这里只能精确匹配查找
====
An ApplicationPoolIdentity
's group membership can be examined using the SysInternals Process Explorer tool. Find the worker process that is running with the Application Pool Identity you're interested in (you will have to add the User Name
column to the list of columns to display:
Open ProcessExplorer\procexp64.exe as Administrator and find the w3wp.exe process.
Check the security tab
IIS application pool access desktop denied的更多相关文章
- SharePoint Error occurred in deployment step 'Recycle IIS Application Pool': 0x80070005:拒绝访问
错误出现的前提:多个用户在一台机器上做开发,使用非系统管理员账号时会出现,因为一般创建网站集时指定管理员为系统管理员: 使用 Visual Studio 2010 部署时报错:Error occurr ...
- 【Azure 云服务】在Cloud Service的代码中如何修改IIS Application Pool的配置呢? 比如IdleTimeout, startMode, Recycling.PeriodicRestart.Time等
什么是 PaaS?Platform as a Service 平台即服务 (PaaS) 是云中的完整开发和部署环境,你可以使用其中资源交付内容,从基于云的简单应用到启用云的复杂企业应用程序皆可.你以即 ...
- How do I create an IIS application and application pool using InnoSetup script
Create an IIS application. Create a new IIS application pool and set it's .NET version to 4. Set the ...
- Application Pool Identities
Whether you are running your site on your own server or in the cloud, security must be at the top of ...
- 如何在Windows 2003+IIS6的环境下找回应用程序池(application pool)中的服务账号密码
上一篇文章说了说如何在Win2008+iis7中取出SharePoint管理账号密码的方法. 整个过程简单的讲,就是通过使用要找回密码的账号用来在SharePoint中创建一个临时的Web Appli ...
- 排错技能:任务管理器中追踪某w3wp.exe是哪个IIS站点的application pool
如果Windows的任务管理器中发现某个w3wp.exe占用了100%CPU,那我们就要揪出这是那个网站的application pool在作怪, 首先,每个站点一定要单独使用各自的applicati ...
- Access is denied
昨天有学习ASP.NET MVC的publish和IIS发行网站<简单的ASP.NET MVC发布>http://www.cnblogs.com/insus/p/4466200.html ...
- Parser Error Message: Access is denied【转】
PRB: Access Denied Error When You Make Code Modifications with Index Services Running View products ...
- 批量启动application pool
在powershell中执行 Get-ChildItem IIS:\AppPools | where {$_.state -eq "Stopped"} | Start-WebApp ...
随机推荐
- jsp页面遍历输出
<c:foreach>类似于for和foreach循环 以下是我目前见过的用法: 1.循环遍历,输出所有的元素.<c:foreach items="${list}" ...
- Linux 下eval命令揭秘
eval 命令中文意思是“重新计算求出参数内容”,该命令大致有以下几个作用 将变量名替换后并执行 beautifulsoup4- Desktop Documents hc.war lxml- mybl ...
- 【模板】prim的heap优化
简单的代码.. 时间复杂度为O((n + m)logn) 大部分情况下还是跑不过kruskal的,慎用. #include <cstdio> #include <queue> ...
- hdu 1563简单异或Find your present!
#include<stdio.h> int main(){ int n,m,s; while(scanf("%d",&n),n) { s=0; w ...
- react.js 组件之间的数据传递props
/* *属性 * 1.如何传递属性 * 2.属性和状态区别和联系 * * 3.子组件都有一个props属性对象 * * 4.单线数据流(只能从父组件流向子组件,就是在父组件定义一个属性,子组件可以通过 ...
- Codeforces936D. World of Tank
$n \leq 1e9$,$n*2$的网格里有$m_1+m_2 \leq 1e6$个障碍物,现有一坦克从$(0,1)$出发要到$(n+1,1/2)$,他每秒可以换行(纵坐标1变2或2变1)也可以发炮弹 ...
- iOS-bug·Failed to connect to github-production-release-asset-2e65be.s3.amazonaws.com port 443: Operation time out
在首次运行 react naticve 项目时, 遇到了如下的问题: Failed to connect to github-production-release-asset-2e65be.s3.am ...
- web.py 使用 db.select 返回的数据只能遍历一次
2013-10-05 23:04:33| 1. web.py 使用 db.select 返回的数据只能遍历一次import webdb = web.database(dbn='mysql', db ...
- Tell me the area---hdu1798 (数学 几何)
http://acm.hdu.edu.cn/showproblem.php?pid=1798 给你两个圆求阴影部分的面积 求出两个扇形的面积减去四边形的面积 扇形的面积是度数(弧度制)*半径的平方 不 ...
- java实验(三)——课堂小测
这次的课堂小测是用以前生成的那些四则运算的代码,然后将这些题目写到一个文件中,再通过这个文件读取题目的信息,每读入一个答案的时候,遇到星号的时候,等待用户输入然后判断输入的答案是否正确,然后输出小一道 ...