I am SSHing into an Ubuntu machine where I use Bash as the shell. I used to be able to edit my ~/.vimrc
file very easily. Now, whenever I try to write to it, I get a warning
E297 write error in swap file
and also after typing in text, I cannot save the changes. Vim tells me that
E667: Fsync failed.
In order to exit the file, I simply have to type the :q!
(force quit command).
This also happens to my ~/.bashrc
file, and any other ~/.file
that I access. However, I can successfully edit files in any directory outside of /usr2/
.
This is an NFS file system and ls -ld ~
outputs that I have rwx
permissions on that directory, and that I am the owner of it:
drwxrwxrwx 9 my_name users ... /usr2/my_name
It is odd because I am the owner of the file and have reading and writing permissions:
ls -l ~/.vimrc
-rwxr----- 1 my_name users 172 Aug 18 14:18 /usr2/my_name/.vimrc
I also have only used 54% of my allotted disk space by my system admin, so it cannot be a disk space issue. I also cannot find any .vimrc.swp
files.
ls -ld ~
show you correct permissions to your home directory itself?.vimrc
file shouldn't have the "execute" bit set... But that's just a minor hygiene issue, probably not really the source of the issue you're having.):swapname
which will tell you the name (and location) of the swap file for the file you're editing. What does:set directory?
tell you? (That configures where swap files are supposed to be stored...)ls -ld ~
command. Running:swapname
shows me that there actually is indeed a swap file in /usr2/my_name/.vimrc.swp. Runnnig:set directory?
showsdirectory=.,~/tmp,/var/tmp,/tmp
. Should I delete the swap file?/usr2
directory is a weird filesystem... You can see that withdf -Th ~
which will tell you the filesystem type. Please edit the question to add more information, it's hard to follow information from comments... (Also include the aforementionedls -ld ~
output shen you edit the question...)