本文介绍了文件权限问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我是ASP新手。我有一个问题,ASP脚本打开我的服务器上写的 文件。这就是我如何得到这个错误: 我从下载了一个整洁的FileUpload ASP示例 http://www.asp101.com/articles/jacob/scriptupload.asp 。 我复制到我的Win2000AS / SP4服务器上的wwwroot文件夹: - main .asp文件 - 主文件引用的从属.asp文件;并且 - 一个webform .html文件 由于我遇到的问题,我添加了一些调试 语句到脚本。然后我通过引用服务器的IP地址附加了webform ..html文件的名称,使用IE6.0从工作站调用webform 。 br /> 我用以下表格填写了表格: - 姓名:RLM - 档案:F:\ _Projects_Current\_Projects_ASP \ Test\Upload_tes t.txt 并点击提交。我收到以下错误: Microsoft VBScript运行时(0x800A0046) 权限被拒绝 /upload.asp,第137行 违规行是: 设置oFile = oFS.CreateTextFile(sPath& FileName,True) 我评论了这一行,然后产生了: 感谢您上传RLM 保存到文件夹D:\ UploadedFiles \ 验证文件夹D的存在:\ UploadedFiles \ 将数据保存到D:\ UploadedFiles \ Upload_test.txt 文件上传:Upload_test.txt 大小:21个字节 类型:text / plain 关于如何解决此问题的任何想法? - 问候, 理查德 我能抵抗除诱惑之外的一切 Lord Darlington在Lady Windermere的粉丝中作者:Oscar WildeHi,I new to ASP. I have a problem with an ASP script opening a file forwriting on my server. Here''s how I got to this error:I downloaded a neat FileUpload ASP example from http://www.asp101.com/articles/jacob/scriptupload.asp.I copied to my wwwroot folder on my Win2000AS/SP4 server:- main .asp file- a subordinate .asp file that the main file references; and- a webform .html fileBecause of the problem I encountered I added a number of debuggingstatements to the script. Then I invoked the webform from a workstationusing IE6.0 by referencing the server''s IP address appended with webform..html file''s name.I completed the form with:- Name: RLM- File: F:\_Projects_Current\_Projects_ASP\Test\Upload_tes t.txtand clicked Submit. I got the following error:Microsoft VBScript runtime (0x800A0046)Permission denied/upload.asp, line 137The offending line is:Set oFile = oFS.CreateTextFile(sPath & FileName, True)I commented out this line, which then yielded:Thank you for your upload RLMSaving to folder D:\UploadedFiles\Validating existence of folder D:\UploadedFiles\Saving data to D:\UploadedFiles\Upload_test.txtFile Uploaded: Upload_test.txtSize: 21 bytesType: text/plainAny ideas on how I can fix this?--Regards,RichardI can resist everything except temptationLord Darlington in "Lady Windermere''s Fan" by Oscar Wilde推荐答案 我试图提供写权限到该文件夹​​如下: 我在服务器上的Windows资源管理器中右键单击该文件夹名称, 单击打开UploadFiles的属性属性对话框, 单击Web共享选项卡, 单击共享此文件夹单选按钮, 接受默认值:Read,Write和Scripts。 仍然被拒绝权限。 再次打开UploadedFiles属性对话框, 单击共享此文件夹单选按钮, 接受默认值sharename UploadedFiles 点击了Permissions按钮,打开了 UploadedFiles对话框的权限, 点击删除每个人都有用户的屁股, 点击添加按钮(关闭UploadedFiles对话框的权限), 双击工作站的名称然后单击选择用户,计算机 或组对话框, 单击(允许)完全控制工作站的名称。 仍然被拒绝权限。 停止并重新启动IIS 在IIS的Microsoft管理控制台中。 右键单击唯一条目,服务器名称 点击停止IIS 停止后,右键单击服务器名称 点击重新启动IIS 仍然被拒绝权限。I tried to provide write permissions to that folder as follows:I right-clicked that folder name in Windows Explorer on the server,clicked Properties which opened the UploadFiles Properties dialog,clicked Web Sharing tab,clicked the Share this folder radio button,accepted the defaults of: Read, Write and Scripts.Still got Permission denied.Again opened the UploadedFiles Properties dialog,clicked Sharing tab,clicked the Share this folder radio button,accepted the default sharename UploadedFilesclicked the Permissions button which opened the Permissions forUploadedFiles dialog,clicked Remove on the Everyone class of users,clicked the Add button (closing the Permissions for UploadedFiles dialog),double-clicked my workstation''s name and OK in the Select Users, Computersor Groups dialog,clicked (Allow) Full Control on workstation''s name.Still got Permission denied.Stopped and restarted IISIn Microsoft Management Console for IIS.right-clicked the one-and-only entry, the server nameclicked Stop IISAfter it stops, right-click the server nameclicked Restart IISStill got Permission denied. 这篇关于文件权限问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-24 07:01