7

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.
  • Nicolas Raoul
    • 58,567
    • 58
    • 222
    • 373
    • Please quote that part from `smb.conf` on your Samba server that sets the properties for the `Share2` share. Also, what are the Unix file permissions for the filesystem directory where this share is hosted? (in other words: permissions for what is described by `path = ...` in smb.conf) – Kurt Pfeifle Jul 31 '10 at 14:00

    2 Answers2

    3

    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

    Sander Rijken
    • 21,376
    • 3
    • 61
    • 85
    • Unfortunately, changing to the correct syntax does not change anything. Both syntaxes (legacy and correct) lead to the same problem. Thanks anyway! – Nicolas Raoul Dec 15 '09 at 05:40
    • `file://` is a **local file** protocol URI scheme, the OP asked for a samba URI, which is `smb://` or `cifs://`. See https://en.wikipedia.org/wiki/List_of_URI_schemes. Web browsers don't support the entire set of URI schemes, just URLs which is a simpler subset. Also you can't create a usable link with a href=smb:// scheme because that's not a registered scheme on most browsers (you probably need a browser plugin to handle it). – Paul-Sebastian Manole Sep 14 '22 at 07:55
    0

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

    Stian
    • 1