Server /Etc/ Permissions Went Wrong
Hi,
I mistakenly changed the permissions of /etc/ to 777. I ran this command mistakenly: sudo chmod -R 777 /etc/. Because of that now I cant ssh into the server or do anything. What is the solution here?
3 Replies
@stevewi How do I do that? As I click on the Launch Lish Console it logins me as forge user, how do I login as root? I rebooted in rescue mode, then launched lish as root and tried to revert the permissions back but it didn't work.
I rebooted in rescue mode, then launched lish as root and tried to revert the permissions back but it didn't work.
When you boot to rescue mode, you get a memory-based Linux (a fairly minimal distro called Finnix). The permissions you changed were for Finnix's /etc…
After you boot to rescue mode, you need to mount the disc that would be /dev/sda on your Linode to the Finnix system someplace:
mkdir /mnt
mount /dev/<linode-drive> /mnt
After you do this, the directory you want will be located at /mnt/etc…then you can change permissions with abandon.* When you're done, just boot your Linode. All traces of Finnix will be gone.
It might be easier to restore a backup from a time BEFORE your change. You do have backups, right?
When you get your Linode back to working correctly, you should probably fix it so that when you start the console with lish, you get the login: prompt…not get automatically logged in to some app you may have running.
-- sw
* As you've already discovered, you need to be careful when you do this.