I'm using MacFusion sshfs in combination with Midnight Commander, and when I edit remote text files with mcedit, weird symlinks are created on the remote system.
$ ls -l .*
lrwxr-xr-x 1 user group 34 Jun 27 01:54 .#filename.txt ->
[email protected]
where etranger is my local login name, and mbp is a hostname of my notebook running MacOS.
symlinks can be removed by running remote rm command, but cannot be deleted on the mac-fuse mounted volume and thus pollutes the
filesystem.
I cannot figure what part of software is responsible for this, and how I could fix this, any help is appreciated.
EDIT:
This appears to be mcedit behavior as documented here:
https://dev.openwrt.org/ticket/8245
Apparently, sshfs fails to remove symlink to the lock file for some reason (".#" in filename, perhaps), and it pollutes the
filesystem.
A quick workaround is possible, using another bug of Midnight Commander: editing (F4) the broken symlink effectively converts it to a missing lock file it was supposed to point to, and removes the symlink itself. The newly created file may then be deleted normally.
EDIT 2:
Unchecking "Follow symlink" in MacFusion apparently allows sshfs to remove dead symlinks, so the problem disappears completely.