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
    

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ