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
feita há 6 meses202 visualizações
1 Resposta
0
Resposta aceita

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
ESPECIALISTA
respondido há 6 meses
profile pictureAWS
ESPECIALISTA
avaliado há 6 meses
  • 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
    

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas