I've accidently run chmod -R 600 / on ubuntu AWS Server. Tried stopping it but didn't happen. Is there a way by which I can atleast backup my data present in the server. Thanks.
Asked
Active
Viewed 143 times
2
-
I'm running out of time. If the server log me out I can't even log myself back in as the server won't allow login from ubuntu user anymore. Please help – Akshay R. Oct 06 '16 at 08:31
-
1Boot the rescue system of your server, mount your system and back up your data. – Gerald Schneider Oct 06 '16 at 08:32
-
There is nothing that can "revert" a chmod command. Do as @GeraldSchneider suggested – Orphans Oct 06 '16 at 08:33
-
How to do that in ubuntu hosted on AWS server – Akshay R. Oct 06 '16 at 08:39
1 Answers
3
- Spin up another instance.
- Mount the disk from the damaged instance on to a non root mount point (e.g. /mnt).
- Backup your data
- Recover to a new instance

user9517
- 115,471
- 20
- 215
- 297
-
Are you sure that's going to work? As the permissions are infected right now – Akshay R. Oct 06 '16 at 08:45
-
2Yes it will work, mounting the `broken` volume on a non root mount point will not affect the clean newly setup instance. You can then back it up and/or try to fix the permissions. I'd start with something like `find /broken_mount_point -type d -exec chmod u+x {} \;` and work from there. – Unbeliever Oct 06 '16 at 09:00
-
Still unable to access any file. Says permission denied on every command even cd – Akshay R. Oct 06 '16 at 12:46
-
Got it working by following some directions from other questions. Thanks guys @Unbeliever and hangin-on-in-quiet-desperation. Specially for the confidence in such a crazy situation. – Akshay R. Oct 06 '16 at 12:57