debian下常见问题

常见问题

1. root用户无法修改hosts文件

root@VM-16-14-debian:/etc# sudo chmod u+w hosts
sudo: unable to resolve host VM-16-14-debian: Name or service not known
chmod: changing permissions of 'hosts': Operation not permitted
root@VM-16-14-debian:/etc# chmod u+w hosts
chmod: changing permissions of 'hosts': Operation not permitted
root@VM-16-14-debian:/etc# lsattr hosts
----ia--------e------- hosts
root@VM-16-14-debian:/etc# chattr -ia hosts
root@VM-16-14-debian:/etc# lsattr hosts
--------------e------- hosts
root@VM-16-14-debian:/etc# chmod u+w hosts
posted @ 2024-08-06 20:13  笨功夫才是真功夫  阅读(2)  评论(0编辑  收藏  举报