vi编辑问件时出现错误:E212: Can't open file for writinglinux
linux 下经过vi编辑文件,使用 :qw 保存时提示以下错误信息:服务器
E505: "7.05.p7" is read-only (add ! to override)app
使用 :qw! 强制保存,提示以下错误:ide
"7.05.p7" E212: Can't open file for writingserver
使用 :q! 强制退出。
检查文件属性:blog
[test-server:~]ll 7.05.p7get
test-server:~>getfacl 7.05.p7it
test-server:~>lsattr 7.05.p7
lsattr: Inappropriate ioctl for device While reading flags on 7.05.p7io
从上面信息能够看到,该文件应属于节点文件属性,所以检查下 fstab文件:
查看文件所属路径:class
test-server:~>pwd 7.05.p7
/tools/
文件在 /tools/目录下。
检查fstab文件:
test-server:~>cat /etc/fstab
由此能够看出,该文件实际是在 192.168.0.10服务器内,所以,须要在该服务器上修改该文件。