I used sudo chmod 744 / plz give me the solution

0

I used sudochmod 744 /. I know I'm stupid, but I want to change that authority back to 777. The root permission is annotated and cannot be accessed by root. Please tell me the solution.

saesig
질문됨 6달 전202회 조회
1개 답변
0
수락된 답변

Hello.

Stop the problematic EC2 and detach the root volume's EBS.
After that, attach EBS to the rescue EC2 and mount it.
You may be able to restore it by changing the permissions of the attach volume using the following command after mount it.
https://repost.aws/knowledge-center/ec2-linux-emergency-mode

sudo mkdir /mnt/rescue
sudo lsblk -f
sudo mount /dev/nvme1n1p1 /mnt/rescue -o nouuid
chmod 777 /mnt/rescue/

Please change "nvme1n1p1" to the device name confirmed by the "sudo lsblk -f" command.
After changing the permissions, detach EBS from the rescue EC2 and attach it to the original EC2.

profile picture
전문가
답변함 6달 전
profile pictureAWS
전문가
검토됨 6달 전
  • Thank you for your reply. However, I proceeded as you said and ran the instance, but the instance was running and spewed a systemlog error.

    [ 96.900133] cloud-init[1986]: 2023-11-16 07:53:42,912 - url_helper.py[WARNING]: Exception(s) [UrlError("HTTPConnectionPool(host='169.254.169.254', port=80): Max retries exceeded with url: /latest/api/token (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f5dd19d8ee0>: Failed to establish a new connection: [Errno 101] Network is unreachable'))"), UrlError("HTTPConnectionPool(host='fd00:ec2::254', port=80): Max retries exceeded with url: /latest/api/token (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f5dd31d98e0>: Failed to establish a new connection: [Errno 101] Network is unreachable'))")] during request to http://[fd00:ec2::254]:80/latest/api/token, raising last exception [ 96.971301] cloud-init[1986]: 2023-11-16 07:53:42,912 - url_helper.py[WARNING]: Calling 'None' failed [0/120s]: request error [HTTPConnectionPool(host='fd00:ec2::254', port=80): Max retries exceeded with url: /latest/api/token (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f5dd31d98e0>: Failed to establish a new connection: [Errno 101] Network is unreachable'))]

    Can you tell me why this error occurs?

  • It would be helpful if you could tell me exactly which steps you followed.
    There appears to be a problem with communication, such as a network interface. Please check whether the settings or permissions of the following files are correct.

    /etc/network/interfaces
    

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠