江湖救急,高手请进!!!Windows 2003 中文件夹的权限自动继承到文件夹下的文件
jzhan 2008-10-20 03:50:43 现在我又一个web页面,会先从ftp上下载一个txt(file.txt)文件然后放在iis server上的C:\AAA这个文件夹下,然后web页面的程序在把这个文件(file.txt)的内容读出来显示在页面上.
但是现在遇到一个问题.
1. file.txt这个文件能够正常的从ftp上下载到iis server上的C:\AAA 文件夹里.(ftp的下载方式就是用Windows自带的ftp.exe + ftp的指令文件)
2. 但是当我的web 程序去读这个file.txt文件的时候,会有error Access to the path "C:\AAA\file.txt" is denied. 具体的描述如下,
Exception Details: System.UnauthorizedAccessException: Access to the path "C:\AAA\file.txt" is denied.
ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.
To grant ASP.NET write access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.
我在文件夹C:\AAA上给了asp.net Machine Account 为读写权限, 但是从ftp下载来的文件的权限却没有自动继承asp.net machine account, 只有administration和system.
要怎么样才能让文件file.txt在下载后自动继承asp.net machine account的读写权限.
高手们来啊~~~~~