I won't be the first and I won't be the last, I suppose. While playing around with the find command, I made a whoops and it would appear that instead of changing the permissions of the ~/web directory to 750, it changed the permissions of the entire filesystem (/) to 750, however I'm not certain, but any attempt to investigate is thwarted by Permission denied messages. For everything.
This was the offending command:
sudo find ~/web . type d -exec chmod 750 {}
If I'm not mistaken, the Ubuntu team disabled root logins as a safety precaution so I'm out of ideas.
I'm (obviously) a total newbie when it comes to file permissions so I was wondering if anyone had some good or even some bad advice to share. I've mentally prepped myself to losing everything on the computer which is only of mild consequence, since I have backups, but I did do a bit of work on this box over the week and it would be a shame to lose it all due to a boneheaded mistake.
If you are reading this message, ask yourself, have you backed up any of your work recently?
Thanks in advance for any insights. Feel free to scold me for using sudo carelessly
At this point, the only way I can think of that might help you is to do a reinstall without formatting.
However, you could try logging in, and then doing sudo -i
which will give you root access. You could also do what is suggested here. Also, the serverfault guys suggest reinstalling as well, to that might just be your best option. :(
If you do a reinstall without formatting, make sure to log in via a tty and run the following:
sudo chmod -R 700 /home/YOUR_USERNAME && sudo chown YOUR_USERNAME:YOUR_USERNAME /home/YOUR_USERNAME
. To find out what your username is, run whoami
and it will tell you.
Then reboot, and you should be set.
Also, I don't think anyone here will scold you - I've done it once, I also did a sudo rm -rf /*
on a production system once, so don't feel bad. :)
No comments:
Post a Comment