centos 删除文件夹 permission denied, xxx is not in the sudoers file.
来源:互联网 发布:社交网络中文 编辑:程序博客网 时间:2024/06/16 14:23
centos 删除文件夹 permission denied
用 tar 命令解压出来的文件夹却带了个锁,无法删除;
如下图:
使用 rm -rf 删除输出如下:
加 sudo 执行后发现关键信息了:xxx is not in the sudoers file.
解决方法:
首先需要切换到root身份
$su -
(注意有 -,这和su是不同的,在用命令"su"的时候只是切换到root,但没有把root的环境变量传过去,还是当前用户的环境变量,用"su -"命令将环境变量也一起带过去,就象和root登录一样)
然后
$visudo //切记,此处没有vi和sudo之间没有空格
1、“:$”移动光标,到最后一行
2、按a,进入append模式
3、输入您的用户名及后面的信息
your_user_name ALL=(ALL) ALL
4、按Esc
5、输入“:wq”(回车,保存文件并退出)
这样就把自己加入了sudo组,可以使用sudo命令了。
1 0
- centos 删除文件夹 permission denied, xxx is not in the sudoers file.
- CentOS──xxx is not in the sudoers file
- xxx is not in the sudoers file
- xxx is not in the sudoers file
- xxx is not in the sudoers file.
- xxx is not in the sudoers file
- The Solution to "xxx is not in the sudoers file"
- 解决centOS下xxx is not in the sudoers file 问题
- CentOS──xxx is not in the sudoers file解决方法
- centos 修改xxx is not in the sudoers file. This incident will be reported
- CentOS──xxx is not in the sudoers file解决方法
- CentOS──xxx is not in the sudoers file解决方法
- CentOS──xxx is not in the sudoers file解决方法
- CentOS──xxx is not in the sudoers file解决方法
- CentOS──xxx is not in the sudoers file解决方法
- CentOS──xxx is not in the sudoers file解决方法
- CentOS──xxx is not in the sudoers file解决方法
- centos下xxx is not in the sudoers file.this incident will be reported
- 【J2SE】IntelliJ IDEA中Lambda表达式警告:Can be replaced with method reference less
- C语言错题集
- Java网络编程(一) TCP/IP,http,socket,长连接,短连接
- PL/Sql Dev调试Oracle存储过程、触发器、函数
- 采用系统API实现的二维码扫描、识别和生成
- centos 删除文件夹 permission denied, xxx is not in the sudoers file.
- 简单工厂模式学习
- 清风徐留一笑而过
- Lintcode_108 Palindrome Partitioning II
- Android音频开发(6):使用 OpenSL ES API(上)
- Python flask使用templates 和static文件
- Python flask使用templates 和static文件
- 《Java数据结构与算法》笔记-CH5-链表-8实现双链表,头部和尾部插入和删除
- MongoDB c++ driver(三)