I accidently chmodded the / 0755 folder, i can´t access on SSH, Filezilla, SFTP, or via Google CLoud command to my instance, i would like to know what to do on this situation.
Thanks !
I accidently chmodded the / 0755 folder, i can´t access on SSH, Filezilla, SFTP, or via Google CLoud command to my instance, i would like to know what to do on this situation.
Thanks !
Fix using Google Metadata Startup Script
https://cloud.google.com/compute/docs/startupscript
Create a script and add it to the Metadata:
chmod -R go-w /
chmod 440 /etc/sudoers
chmod 640 /etc/shadow /etc/gshadow
chmod 600 /etc/ssh/*_key /etc/ssh*key # whichever matches
chmod 710 /etc/ssl/private /etc/cups/ssl
chmod 1777 /tmp /var/tmp /var/lock
chmod 4755 /bin/su /usr/bin/passwd /usr/bin/sudo /usr/bin/sudoedit
chmod 2755 /var/mail /var/spool/mail
Restart server and voilá !