Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.
  • like image 323
    Nicolas Raoul Avatar asked Dec 14 '09 09:12

    Nicolas Raoul


    1 Answers

    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

    like image 135
    Sander Rijken Avatar answered Sep 24 '22 11:09

    Sander Rijken