Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected behaviour with SMB on MacOS #1

Open
maxiimilian opened this issue Mar 9, 2021 · 0 comments
Open

Unexpected behaviour with SMB on MacOS #1

maxiimilian opened this issue Mar 9, 2021 · 0 comments

Comments

@maxiimilian
Copy link
Owner

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant