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

Nicolas Raoul picture Nicolas Raoul · Dec 14, 2009 · Viewed 18k times · Source

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

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 denied without even asking for a password. What should I write in the HREF for IE7/8 to be able to open folder3?

Notes:

  • It works fine if the path does not contain the folder3 part.
  • 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.
  • 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 not contain the folder3 part.
  • Answer

    Sander Rijken picture Sander Rijken · Dec 14, 2009

    The correct syntax for file:// links is:

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

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