LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Locked up my server because of chmod 600 / (!) (https://www.linuxquestions.org/questions/linux-newbie-8/locked-up-my-server-because-of-chmod-600-a-4175501190/)

mgai7755 04-10-2014 03:22 AM

Locked up my server because of chmod 600 / (!)
 
Hi,

I made an horrible mistake while adding a new account's ssh keys and fixing the file's permissions. I wanted to type "sudo chmod 600 ." and wrote "sudo chmod 600 /", resulting in an rapidly unreachable server because of widespread permissions issues.

The (remote) server can only be accessed through ssh with public key authorisation. In the case I could gain access to it through a KVM (I'm dealing this with my provider), what are my options to fix this mistake ?

Thanks for helping me fixing this disaster :-(

Matthieu

Smokey_justme 04-10-2014 03:51 AM

Hmm.. The good news is that you didn't use recursion..

So this should work (as root, but he's the only user that can login right now anyway):
Code:

chmod 755 /

mgai7755 04-10-2014 04:22 AM

Thanks Smokey !

Do I have any chance to login remotely using root even with the public key authorisation messed up ? (I can't test right now). I didn't configured this server so I don't know exactly its settings.

Smokey_justme 04-10-2014 04:34 AM

If root logins are enabled (which they shouldn't be) and you have a ssh key already setup in root authorized keys file (which you shouldn't have), then yes.. ssh shouldn't complain about it and root isn't limited by access permissions..

mgai7755 04-10-2014 03:27 PM

WORKING ! Thanks really !
Matthieu

Smokey_justme 04-10-2014 04:04 PM

Glad it helped you :)

suicidaleggroll 04-10-2014 04:05 PM

Quote:

Originally Posted by Smokey_justme (Post 5149943)
If root logins are enabled (which they shouldn't be) and you have a ssh key already setup in root authorized keys file (which you shouldn't have), then yes

LOL

That made me chuckle


All times are GMT -5. The time now is 03:48 PM.