
Description
As referenced in #556, starting from this comment #556 (comment) I hijacked the issue to discover that macOS uses the inode number 1 on an exFAT filesystem.
This leads to the error message
panic: using reserved ID 1 for inode number
when using gocryptfs later than v1.8.0.
Regarding @rfjakob's request
I would just try and see what
rm foo touch foo ls -li foo
says on exfat.
$> rm foo # make sure foo doesn't exist
rm: foo: No such file or directory
$> touch foo
$> ls -li foo
1 -rwxrwxrwx 1 user group 0 27 Jul 10:04 foo
Interestingly:
$> touch foo2
$> ls -li foo*
1 -rwxrwxrwx 1 user group 0 27 Jul 10:04 foo
1 -rwxrwxrwx 1 user group 0 27 Jul 10:06 foo2
But that's probably some optimization, because:
$> rm foo foo2
$> echo "text" >> foo
$> touch foo2
$> ls -li foo*
5163394 -rwxrwxrwx 1 user group 5 27 Jul 10:08 foo
1 -rwxrwxrwx 1 user group 0 27 Jul 10:08 foo2
The problem with macOS is probably, that when opening a directory in the Finder, the Finder immediately places a file called .DS_Store in that directory.
This file stores things like how the folder's contents should be displayed, such as list, details or symbols, and in the case of the latter, the specific positions of these symbols.
Initially this file is empty, and thus probably gets inode number 1, once the directory is opened for the first time in the Finder.
Thus: When one only works with directories on the command line and never creates empty files, this issue is unlikely to hit anybody.
The question remains, why gocryptfs v1.8.0 is unaffected.
Probably because of go-fuse?
Edit: Interestingly this "empty file inode number 1 sharing" does not happen on macOS's native APFS:
$> touch foo foo2
$> ls -li foo*
36977462 -rw-r--r-- 1 user group 0 27 Jul 10:30 foo
36977463 -rw-r--r-- 1 user group 0 27 Jul 10:30 foo2