4

I accidentally executed

chmod 755 -R $HOME

For now everything works fine, but I haven't rebooted my laptop yet.

I wanted to know what are the consequences of my actions? I'm especially concerned about configuration files. Could something break?

The only important thing I can think of is to set back correct permissions on ssh keys. Is there anything else I should take care of?

I'm aware of exising question: What if I accidentally run command "chmod -R" on system directories (/, /etc, ...), but it seems to address bigger issue which is running chmod on system directories.

Keammoort
  • 143
  • 2
    ssh keys and gpg will not work with those permissions. As you are the owner of most everything in $HOME you should otherwise be fine. – Panther Nov 08 '16 at 18:37
  • Ahh bummer, I've been using *nix flavors for about 18 years now, and I pulled my first "rm -fr /" accidentally a couple months ago when my keyboard stuck and the dot key didn't work. I meant to do ./ . Fortunately the gods were shining upon me and I also forgot "sudo", but it was still a mess for my home dir... – Adam Plocher Jul 10 '17 at 10:49

1 Answers1

3

You have changed the permissions of all files and directories in and underneath $HOME from whatever they were (and each file or directory had it own permissions) to rwxr-xr-x. This marks all files "executable" , and grants Other (User, Group, Other) users the ability to inspect and traverse the directories and read all your files. The change will break ssh, and could cause other problems.

You can fix ssh via:

chmod 700 ~/.ssh
chmod 600 ~/.ssh/* ~/.Xauthority

I included ~/.Xauthority to avoid X authentication problems.

Don't execute commands you hear of (read in a book, see online, ...) without understanding what they do. At the very least (for this case) read man chmod, info coreutils 'chmod invocation' and maybe man 2 chmod.

Linux, like Unix, makes it possible to do Powerful Things, but does not require Powerful Things to be Safe. Figure out what it does BEFORE lighting fuse.

waltinator
  • 36,399