0

I recently installed Ubuntu on a personal computer and I am the only user. I am having this issue where every time I save something to the Desktop the icons rearrange. (I still have not solved this issue so solutions are welcome)

In an attempt to solve the Desktop issue I tried executing sudo chmod -R 766 /home/(UserName) after reading Desktop icons keep rearranging whenever I refresh the desktop or boot the system. This of course set all the files and directories to 766 and promptly messed up all sorts of permission stuff.

After I realized what I did, I then turned them all back to 755 using sudo chmod -R 755 /home/(UserName) and slowly went through and changed permissions on individual files ones by one to restrict permissions.

My question: If I miss something and don't restrict the permissions, could that lead to problems? Security problems or otherwise. Thank You

Zanna
  • 70,465

1 Answers1

3

The important files/directories to change are ~/.ssh and ~/.gnupg. If those aren't set right, the programs have a tendency not to work as they're super picky about permissions. Otherwise, as the only user, you're pretty safe.

In case this happens in the future, here are two commands that can speed things up:

  • Change permissions on all directories in your home: find /home/(UserName) -type d -exec chmod 750 {} \;
  • Change permissions on all files in your home: find /home/(UserName) -type f -exec chmod 640 {} \;

You can obviously tweak the permissions and the search directory as needed.

Brian Turek
  • 1,826