Search code examples
linuxwindowssambasmb

Create symlink on a samba exported linux directory from Windows


I've the following setup:

  • Linux machine ("fooserver") -> exports /data/directory as a Samba share
  • Windows machine -> mounts /data/directory at j: (net use j: \\fooserver\directory)

The question is: is it possible to create a symlink from Windows on the linux directory exported with SAMBA?

Thanks!


Solution

  • If you mean creating a symlink on the share from the Windows side, that is also a symlink on the (native) filesystem (ext4?) on Linux, then I say no, that is not possible.

    The file system is visible to Windows as share, that bears no way to figure or access the native file system or its features - other than those that resemble a native Windows server's share. It would not be feasible to provide this information, and thus allow such operations, because that would essentially break the transparancy of the remote (file) system. As it is, it is irrelevant to the client which type of operating system or filesystem is present on the remote side.

    It is however possible to follow an existing symbolic link on a samba share from the windows client (i.e. it doesn't really know it is a link. See here for further information).