在FCKEditor中上传文件时出现权限被拒绝错误
我最近将我的 asp.net 应用程序从 Windows 2003 / IIS 6 迁移到 Windows IIS7。 没有其他更改,但现在 fckeditor 的文件上传不再起作用。 任何人都知道我在这里犯的明显错误。 :)
谢谢
I recently moved my asp.net appliaction from windows 2003 / IIS 6 to windows IIS7.
No other changes, but now the file upload for the fckeditor doesn't work anymore.
Anyone know the obvious mistake I made here. :)
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
最可能的问题是需要更新目标文件夹的权限。 检查并确保 IUSR 具有对上传目录的创建/写入权限。
The most likely problem is that the permissions need to be updated on the target folder. Check to make sure IUSR has create / write permissions to the upload directory.
也许这会有所帮助。
我也无法让它工作。 我已经设置了所有权限。 通过调试,我发现frmupload.html对isapi.dll没有执行权限。
在 IIS 7.0 中,我访问了左侧的网站并突出显示了它。 然后在右侧窗格中,我单击处理程序映射。 我在顶部注意到 isapi 和 cgi 在顶部被禁用。
我往下看,看到了所有启用的处理程序。 我还注意到没有 *.html 的,但有 *.html 的。 不管怎样,我右键单击了下部窗格中启用的处理程序所在的任意位置,然后我得到了一个快捷菜单。 编辑功能权限是您要单击的选项。 然后您将看到读取、脚本和执行的复选框。 我注意到执行没有被检查,所以我检查了它。
现在 ISAPI 和 CGI 在列表中已启用。
我尝试使用 FCKeditor 上传,成功了。 只需确保将正确的文件类型上传到正确的区域,否则您可能会收到无效文件或无效文件类型消息。
但是,我注意到我不断收到新错误。 SYS 在我的网页上是未定义的错误消息。 这是一个 javascript 错误,通常在找不到某些内容时发生。 如果你用谷歌搜索它,你可能会收到此错误消息的原因有很多。 本例是因为我使用Vista IIS7.0启用了具有执行权限的ISAPI。 它进入我的配置文件并进行了正确的设置更改以启用执行权限,但是它删除了我所有的处理程序设置!!!!
我备份了 webconfig 并手动读取设置。 我认为也许最好手动编辑 webconfig 文件,而不是让 IIS7 执行此操作,因为它会执行此操作,但可能会删除您的一些设置。
以下是我在 VISTA IIS7 Web 服务器上的 webconfig 文件的一部分,之前和之后:
WebConfig 之前:在 VISTA IIS 7.0 web.config 中启用 cgi 和 isapi 执行
之后:注意
添加后,我所有的处理程序都消失了。 我刚刚读了它们并且它起作用了。
我在开发机器VISTA上,所以我没有考虑打开Execute的任何安全问题。 希望这可以帮助。
Maybe this will help.
I couldn't get it to work either. I had all the permissions set. By debugging, I found out that the frmupload.html did not have execute access on the isapi.dll.
In IIS 7.0 I went to the web site on the left side and highlighted it. Then on the right pane, I clicked on handler mappings. I noticed at the top that isapi and cgi were disabled at the top.
I looked below and saw all the enabled handlers. I also noticed that there was not one for *.html but there was ones for *. Anyways, I right clicked anywhere in the lower pane where the enabled handlers are and I got a short cut menu. EDIT FEATURE PERMISSIONS is the option you want to click on. Then you will see checkboxes for read, script, and execute. I notice execute was not checked so I checked it.
Now the ISAPI and CGI became enabled in the list.
I tried uploading with FCKeditor and it worked. Just make sure your uploading the right file type to the right area or you might get invalid file or invalid file type message.
HOWEVER, i noticed I keep getting a new error. SYS is undefined error message on my web pages. Its a javascript error that usually happens when it can't find something. There are tons of reasons why you might get this error message if you google for it. In this case it was because I used Vista IIS7.0 to enable ISAPI with execute permissions. It went into my config file an made the correct setting change for enabling execute permission, however it erased all my handler setting!!!!
I took a backup copy of my webconfig and manually readded the settings. I think maybe its better to manually edit the webconfig file instead of letting IIS7 do it because it will do it but it might erase some of your settings.
Here is part of my webconfig file on VISTA IIS7 web server, before and after:
WebConfig BEFORE: enabling execute on cgi and isapi in VISTA IIS 7.0 web.config
AFTER: notice the
is added and all my handlers disappear. I just readded them and it worked.
I am on a development machine VISTA so I didn't consider any security issues for opening up Execute. Hope this helps.
就像 Sohnee 所说的最可能的权限一样,还要确保“uploads”文件夹实际上存在于您的“public”文件夹中(我不确定它在 ASP 中的位置)。
Like Sohnee says its most likly permissions, also make sure the 'uploads' folder actually exists in your 'public' folder (I'm not sure where this is in ASP).
确保 asp.net 和 iisuser_machinename 用户拥有权限。
Make sure that asp.net and iisuser_machinename user will have rights.