Using emacs 24.3-22 on CentOS 7.6.1810. Writing to home directory on cifs mounted share.

When writing a file auto-saves will work, but actually clicking the save button or doing Save As gives IO Error writing filename: Input/Output error

Although Save As gives an IO error, the new file is saved. However subsequent attempts to update that new file fails with IO errors

I started Emacs with the --debug-init option, but it didn't reveal anything. I also checked the logs on the network server, it shows the files being opened, saved, and closed. No errors we seen on that end.

I would like to know if anyone has encountered this problem or what other troubleshooting steps can I take.

  • 1
    Can you verify whether other programs can write to these files? Can you try something like echo new > ~/test-file and then echo append >> ~/test-file? Do these commands create a new file and then append to it, or do they fail in a similar way? – user12563 Jul 2 '19 at 14:55
  • I guess that actually setting the file attributes (such as the modification time and chmod) fails. You could try that in M-x eshell. – Tobias Jul 2 '19 at 15:55
  • Yes, this certainly seems like an error in your CIFS configuration, or how you've mounted it locally, rather than an Emacs error per se. Probably you're better off checking mount options and debugging via the shell than from your text editor. Just my 2c. – cyberbisson Jul 3 '19 at 16:10
  • echo, vi and libre office are able to create new files and also update the problematic file emacs is having issues with. i notice the file is seen as "C++ source, Non-ISO extended-ASCII text" although its not a source code file. it just contains copy and pasted material from received emails. – zkenpachi Jul 3 '19 at 16:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.