Ubuntu does not have the root permission and how to solve the mustbesetuidroot error...
Source: Internet
Author: User
Ubuntu does not have the root permission and how to solve the mustbesetuidroot error... -- Linux general technology-Linux technology and application information. For more information, see the following. Setting User Permissions today leads to messy directory permissions during use due to poor planning at first. In the permission settings of the new user, the upper-level or other directories also have full operation permissions. You want to set all other directories to read-only. However, a major error occurred during the operation. The command that caused the error is as follows:
Sudo chown-R boshiadmin: root/
In fact, a directory is missing and the following operations are intended:
Sudo chown-R boshiadmin: root/data0
That is, set your own permissions for the/data0 directory.
After the command is executed, serious and even some terrible consequences occur. The symptoms are as follows:
1. ftp is suddenly unavailable, and all users cannot remotely connect to the ftp through ssh2.
2. The sudo command does not work. Many Commands report the error "must be setuid root. This makes it impossible for me to use the previous user name (haidongqing.
3. Remote Control Using putty also fails.
4. The website can still be viewed normally. This is the only thing that can comfort me. But it is also a sense of being born rather than dead. Because maintenance is not feasible.
Some people on the Internet say that the solution is to redo the system, and the system will be stunned. If so, the system will be completely finished, because I have no recent website backup. It is too late to back up the data.
I checked the materials on the Internet for a long time and found that many of them were copied from each other. Although the method was not correct, it was not very careful. The methods that have been completely tried are described in detail:
1. Restart the server (this requires the cooperation of the data center because the remote control has expired .)
2. Press and hold the ESC key after startup to enable the system to enter the Security repair Mode, that is, the recovery Mode.
3. In the revovery menu, select root to enter the system. This is a command line, and we are also familiar with the root @ haidongqing :~ #
After restarting, the following problems may also occur, that is, because the owner of the etc directory is not root. The system still reports an error when executing sudo.
In this case, run the following command to make the etc directory owner root. Repeat the security recovery mode and run the following command:
1. chown-R root/etc/sudoers
The role is to make the/etc directory owner root
2. chmod 755/etc/
The role is to set the/etc directory permission to 755. In the end, you can check the permission by yourself. In fact, this step is generally not used.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service