I accidentally ran chmod 777 * in my home folder and it changed all the directory permissions (but not for the files).
How can I undo this?
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
Best to run this:
sudo chmod -R a+rwX,o-w /home/$USER
All directories will be 775. All files will be 664 except those that were set as executable to begin with. $USER is your name which normally is a system variable.
This discusses one specific error, but also has the suggested defaults.
More info on permissions: