windows 指向 Samba 共享中目录的 HTML 链接,适用于 Internet Explorer 7/8

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1899848/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 13:35:12  来源:igfitidea点击:

HTML link to directory in a Samba share, that works on Internet Explorer 7/8

windowsinternet-explorersambasmbcifs

提问by Nicolas Raoul

I want my HTML page to link to a directory in a Samba share (protocol SMB/CIFS Windows share). In my HREF I wrote file://server/Share2/folder3

我希望我的 HTML 页面链接到 Samba 共享(协议 SMB/CIFS Windows 共享)中的目录。在我的 HREF 中,我写道file://server/Share2/folder3

Most browsers handle it fine (mount the share and open a file manager on folder3) except Internet Explorer 7 and Internet Explorer 8, which say Permission deniedwithout even asking for a password. What should I write in the HREF for IE7/8 to be able to open folder3?

除了 Internet Explorer 7 和 Internet Explorer 8 之外,大多数浏览器都能很好地处理它(在文件夹 3 上安装共享并打开文件管理器),它们Permission denied甚至不需要密码。我应该在 IE7/8 的 HREF 中写什么才能打开 folder3?

Notes:

笔记:

  • It works fine if the path does notcontain the folder3part.
  • 它工作正常,如果路径并没有包含folder3一部分。
  • It works fine if the share is already mounted. So before testing it, type "net use" to make sure that no share is already mounted.
  • 如果共享已经安装,它工作正常。所以在测试之前,输入“net use”以确保没有安装共享。
  • The Windows username and the share username are not the same, so a popup should ask for a login/password. Again, this works fine if the path does notcontain the folder3part.
  • Windows 用户名和共享用户名不同,因此弹出窗口应该要求输入登录名/密码。同样,这个工作正常,如果路径不包含的folder3部分。
  • 回答by Sander Rijken

    The correct syntax for file:// links is:

    file:// 链接的正确语法是:

    file:///path/on/local/computer
    
    file://server/share/folder
    

    So in your case try file://server/Share2/folder3

    所以在你的情况下尝试 file://server/Share2/folder3

    回答by Stian

    Check if this is fixed by adding the share to trusted sites in IE. (Eg, internet options security, trusted sites)

    检查是否通过将共享添加到 IE 中的受信任站点来解决此问题。(例如,互联网选项安全、可信站点)