Linux操作提示:“Cant open file for writing”或“operation not permitted”的解决办法
来源:互联网 发布:手机卡 非实名 淘宝 编辑:程序博客网 时间:2024/05/29 08:06
Linux操作提示:“Cant open file for writing”或“operation not permitted”的解决办法
在Linux上使用vi命令修改一个文件内容的时候,发现无法保存,每次写完使用“:q!”命令可以正常退出但是使用":wq!"命令保存文件并退出时出现一下信息提示:
E212: Can't open file for writing Press ENTER or type command to continue
出现这个错误的原因可能有两个:
1.当前用户的权限不足
2.此文件可能正被其他程序或用户使用。
一般错误原因都是前者,解决方案是在使用vi命令打开文件时,前面加上sudo来临时提供管理员权限,比如使用命令“sudo vi hosts”打开编辑文件。
由此看来,sudo命令是很有用的,当我们执行某种操作系统提示诸如“operation not permitted”等权限不足信息时,我们很多时候都可以在命令前面加上sudo来解决权限不足问题。比如当我们从Linux服务器上下载某一个文件或上传某一个文件有可能提示这个,也有肯能直接上传不成功但是什么都没提示;这时你就应该想想是不是账号的权限不足,加个sudo试试。
0 0
- Linux操作提示:“Cant open file for writing”或“operation not permitted”的解决办法
- linux操作提示:“Can't open file for writing”或“operation not permitted”的解决办法
- linux操作提示:“Can't open file for writing”或“operation not permitted”的解决办法
- ping: icmp open socket: Operation not permitted 的解决办法
- Python IOError: File not open for writing
- linux下root用户删除文件提示:Operation not permitted
- Linux 下 root用户删除文件提示:Operation not permitted的解决
- Linux 下 root用户删除文件提示:Operation not permitted的解决
- Linux 下 root用户删除文件提示:Operation not permitted的解决
- ping: icmp open socket: Operation not permitted
- 普通用户执行su却出现operation not permitted的解决办法
- ulimit -c 999出现 -bash: ulimit: core file size: cannot modify limit: Operation not permitted的解决办法
- vim保存退出提示can't open file for writing
- 【Adnroid】adb remount 提示:Operation not permitted
- could not disable core file generation for pid 18102: Operation not permitted
- gethostbyname返回错误Operation not permitted解决办法
- pip install operation not permitted 解决办法
- root用户操作文件:Operation not permitted
- 中国大陆CDN的测量与分析
- Labview队列操作
- hdu 1142 最短路径+dfs记忆化搜索
- 一个TextView显示多个颜色
- R语言︱构造新序列
- Linux操作提示:“Cant open file for writing”或“operation not permitted”的解决办法
- Login failed:make sure your username and password are correct and that you’re an admin or moderator
- ViewPager无限自动轮播
- innerHTML和innerText的区别
- REST服务学习笔记一、基于JAX-RS 2.0 REST服务几种类型
- python glob fnmatch 用于文件查找操作
- String、StringBuffer与StringBuilder之间区别
- OOM详解
- 148. Sort List