Skip to content

Unexpected behaviour with SMB on MacOS #1

Description

@maxiimilian

Expected behaviour

Using favdropper on a samba network share mounted using macOS Finder should create a relative symlink also on the same share.

Observed behaviour

On first sight it looks like the symlinks were created successfully. In macOS Finder, the linked files show up in the target directory and can be used normally. However, the actual underlying filesystem does not contain a POSIX symlink but a propriatary macOS XSym file. This file is only 1KB and does not work on Linux as a symlink!

This is probably used because mounting SMB in Finder identifies the filesystem as FAT32 without symlink support. The XSym file works for macOS users just like any normal symlink. Even by creating a link with ln -s a b in terminal on the mounted SMB share creates this XSym file. A successive ls on macOS also gives the impression that a normal POSIX symlink was created. Using file on the symlink does not indicate that it is just an ASCI file. The illusion is perfect as long as you stay on macOS

Fix?

I am not sure how to fix this. Since the "fake symlinks" are even created by manually running ln in terminal, I assume that this "feature" is built into the SMB client/driver. Python's os.symlink, therefore, cannot distinguish between a POSIX symlink and a macOS XSym symlink. My impression is, that this behaviour is completely transparent and undetectable...

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions