VM Instance Access

I cant have access to my vm instance, I have tried everything, created a public key and uploaded it to the metadata, It says permission denied (public key) every time I try to access it. This started happening when I changed the permission of the sessions folder /var/lib/php/sessions/. Please Help

0 1 129
1 REPLY 1

 

Hello, thank you for pointing out which change triggered this issue, which in this case seems to be the permissions changes in folder `/var/lib/php/sessions/`.

I can suggest you two option:

- Option A - Use a startup script to change back the folder permissions. You can add a startup script in a GCE instance reference, this script will run as `sudo` and you should be able to change folder `/var/lib/php/sessions/` permissions. This script will automatically run after restarting the instance.

- Option B - Use the serial port to connect the instance. In GCE there's the option to connect an instance through the serial console (which is a connection over the RS-232 or serial port connection that allows access to the computer), to connect following through the serial console please follow this guide.

Have a nice day.