【发布时间】:2012-06-15 11:08:10
【问题描述】:
我正在编写一个在 IIS 7.0 上运行的 ASP 经典(使用 JScript)存储库,并且在移动文件时遇到了一些权限问题。我必须遵循总是给我一个权限被拒绝错误的通用函数。
function moveFile(source, target){
fs = new ActiveXObject("Scripting.FileSystemObject");
newloc = target + "\\" + source.name;
debug("Copying file: " + source.path + " to " + newloc);
fs.copyFile(source.path, Server.MapPath( "repository/" ), true);
}
当我使用源source.path 为D:\Inetpub_EXT\wwwroot\builder\repo\dump\alicia.docx 和目标为D:\Inetpub_EXT\wwwroot\builder\repo\repository 调用函数时,我得到以下输出:
Treating dumpfile: alicia
Copying file: D:\Inetpub_EXT\builder\repo\dump\alicia.docx to
D:\Inetpub_EXT\wwwroot\builder\repo\repository
Microsoft JScript runtime error '800a0046'
Permission denied
我已验证文件夹和文件都存在,并且我在构建器中完全控制了 IIS_WPG、IUSR、Authenticated User、System 和 Administrators。
感谢您的帮助。
【问题讨论】:
标签: file asp-classic jscript