0

I'll preceed by saying I'm a novice in unix, I use Oracle Always Free for small personal projects. Also this is me trying to save the data specifically on Oracle Cloud.

I accidentally ran sudo chmod 700 -R / on an Oracle Always Free instance, when trying to run it on ./ Now I think I'm locked out of the instance, I no longer can connect to the instance through ssh. Is there anyway to secure specific directories before blasting the instance and starting over?

5
  • Restore from backup, or reinstall Commented Nov 13, 2023 at 21:49
  • You shouldn't ever need sudo if you're modifying files/directories in your personal directory. That would have prevented you breaking your system Commented Nov 13, 2023 at 21:51
  • But your command was wrong anyway: setting everything to octal permissions 700 is unlikely to be correct Commented Nov 13, 2023 at 22:14
  • I understand that now, surely learned my lesson. My only worry now is a specific diretory, there is no way of saving data? Commented Nov 13, 2023 at 23:40
  • @telcoM Thank you! I created a new instance and added the boot volume as an iscsi block volume and was able to scp the files! If you could add this as an answer I'll mark it as the solution. Commented Nov 14, 2023 at 12:14

1 Answer 1

0

In virtualized environments (whether on-premises or in a cloud), trying to boot the virtual machine from an external boot media can sometimes be difficult.

In such cases, it might be easier to disconnect the virtual disk(s) from the failed VM, and connect them as additional disk(s) to another, working VM instance, and then use that instance to recover your data.

While it's technically possible to recover after a recursive chmod from the root directory by first using the package management tools to restore standard permissions to system files and directories, and then going through all the remaining files and directories manually, it might not be the most optimal use of your time and effort.

Restoring from a full backup would definitely be easier and faster; depending on the complexity of the software installed to the cloud instance and the level of automation you've created for your cloud setup, even a full reinstallation might be.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.