I see from Jakob's email that the bug can be reproduced on CIFS without EncFS. However, there's still something wrong here, as Emacs has code to work around the CIFS bug; see the comment about CIFS in emacs/src/fileio.c starting at line 4897, here: http://git.savannah.gnu.org/cgit/emacs.git/tree/src/fileio.c?id=a56eab8259568ea1389e972623e46359e73c0233#n4897 Unfortunately, this workaround for the CIFS bug does not appear to suffice for EncFS over CIFS. Bertrand, can you please try the attached program, both on plain CIFS and on EncFS over CIFS? It attempts to mimic Emacs's actions more precisely than the previous test program, which may help us to narrow down the problem. Thanks.