While trying to fix mySQL I seem to have made a huge mistake running sudo chmod -R 777 / var/lib/mysql which seemed to have change everything to green folder instead of purple and now even files like sudo won't work.
I am logged onto SSH as a root user. How do I become the "owner" and able to access all the files again?
sudo chmod -R 777 / var/lib/mysql
. The space between/
andvar
is important. It's the different between a destroyed system (/ var
) and a recoverable system (/var
). Please review your Question for typos. Pay close attention to that critical space. – user535733 Aug 08 '21 at 01:27Isn't someone the "owner" that has access to everything? How can this be so devastating?
– Julien Rodger Aug 08 '21 at 01:35chmod
changed the permissions for each file from what they were, to777
. There isn't a single permission to set them back to, and you didn't keep track. – waltinator Aug 08 '21 at 01:57I still don't get how accidentally making everything "readable, writable and executable by all users" made me unable to go places, it sounds more like it would open more files if anything.
– Julien Rodger Aug 08 '21 at 02:20