Skip to main content

How does macOS implement symbolic link in Mojave on FAT32 filesystems? [Resolved]

I remember in the past, not all types of aliases (as in the macOS feature) can be created on all filesystems. This is because symbolic link (as in the type of file) is a special Unix file type, whereas aliases (as in the kind of file with resource fork) utilizes resource forks (which on some filesystems creates the ugly "._*" files).

But today, I just created a symbolic link on my FAT32 USB pointing to a folder in my removable harddrive.

My question is:

1) How does macOS Mojave creates symbolic link on FAT32 filesystem?

2) Is it portable with other Unix/BSD/Linux systems?

3) Is it compatible with Cygwin?


Question Credit: DannyNiu
Question Reference
Asked June 25, 2019
Posted Under: Apple
107 views
2 Answers

The Minshall+French format is what macOS uses to store Unix symlinks on FAT and CIFs volumes. More details on the Minshall+French format can be found here:

Along with SAMBA, the Linux CIFS kernel module provides a 'mfsymlinks' mount option (which is off by default) that supports the Minshall+French format. I believe Docker for Windows also supports the Minshall+French format.


credit: Douglas Kosovic
Answered June 25, 2019

They've implemented using regular files - This feature is specific to macOS with FAT32, and is not portable or compatible with other systems or environments.

Here's a screen shot of directory listing in Explorer and "ls -l"

Screenshot of Windows, Cygwin, and FreeBSD directory listing

And here's the content and hexdump of the file:

//64-bit Cygwin @CGEMA/
$ cat /cygdrive/j/MiniSync/Upload/ref
XSym
0019
086ccc9c5c27f3907e47a03c3423b91e
/Volumes/ProNJF/ref

...

//64-bit Cygwin @CGEMA/
$ od -a -t x1 /cygdrive/j/MiniSync/Upload/ref
0000000   X   S   y   m  nl   0   0   1   9  nl   0   8   6   c   c   c
         58  53  79  6d  0a  30  30  31  39  0a  30  38  36  63  63  63
0000020   9   c   5   c   2   7   f   3   9   0   7   e   4   7   a   0
         39  63  35  63  32  37  66  33  39  30  37  65  34  37  61  30
0000040   3   c   3   4   2   3   b   9   1   e  nl   /   V   o   l   u
         33  63  33  34  32  33  62  39  31  65  0a  2f  56  6f  6c  75
0000060   m   e   s   /   P   r   o   N   J   F   /   r   e   f  nl  sp
         6d  65  73  2f  50  72  6f  4e  4a  46  2f  72  65  66  0a  20
0000100  sp  sp  sp  sp  sp  sp  sp  sp  sp  sp  sp  sp  sp  sp  sp  sp
         20  20  20  20  20  20  20  20  20  20  20  20  20  20  20  20
*
0002040  sp  sp  sp  sp  sp  sp  sp  sp  sp  sp  sp
         20  20  20  20  20  20  20  20  20  20  20
0002053

//64-bit Cygwin @CGEMA/
$

credit: DannyNiu
Answered June 25, 2019
Your Answer
D:\Adnan\Candoerz\CandoProject\vQA