Ubuntu – What are the default permissions of directories in home (Desktop, Downloads, etc.)

chmodhome-directorypermissions

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?

Best Answer

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.

echo $USER

This discusses one specific error, but also has the suggested defaults.

https://help.ubuntu.com/community/dmrcErrors

More info on permissions:

https://help.ubuntu.com/community/FilePermissions