Question

Can I backup my files without SSH?

Posted March 19, 2020 313 views
Ubuntu 18.04

This is urgent. Please help me. The support does not seem to be interested in responding.

I have executed chmod 777 on / before I knew what I was doing. After I saw tons of errors like Operation failed:... something... to ~/%name of some root folder% in my console I couldn’t prevent the server from keeping executing the command, so I couldn’t think of anything better than to log into my account and turn the droplet off immediately from the control panel. I did that.

I turned it on again, and I can’t log in via SSH since then. It says: Connection closed by %my_ip% port 22.

Neither can’t I access the server via SFTP; it says Unable to exchange the encryption keys.

I had been logging in with root user, and the only user I have created and remember the password for doesn’t seem to be allowed to execute sudo, so I can’t restart SSH on the server.

I have read online that by executing this command I have crashed my entire filesystem. Could it be restored, at least the part of it where the SSH is? Or, can I backup certain folders just with DO dashboard console logging in as non-root user? Or, how do I log in as a root user from there? Typing root as user does not work.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

Hello, @iavetoshkin

Did you execute the command recursively (with the -R attribute) or just chmod 777 / ?

You can access your server as root using the DigitalOcean console from your control panel. This will give you access to your files and you can make changes from there.

If you have a snapshot of your droplet you can use it to restore the droplet to a previous working state in order to resolve the issue. If you have at least a backup of your files (websites data and database) you can spin up a new droplet and then migrate the data over to the new server.

Regards,
Alex

Submit an Answer