This is an old post but this would be the way I would handle such an issue.
Code:
cd $HOME
find ./ -type f -exec chmod 644 \{\} \;
find ./ -type d -exec chmod 755 \{\} \;
I am not in front of a Linux system at the moment but that should work in bash and on a linux system -- I've double checked the relevant man pages just to make sure.
Now, there are a couple of caveats. Do not run this as root. That alone will avoid 90% of the possible problems. Also, be aware that while find does not follow symbolic links by default... do not depend on that. You may want to make sure that the user doesn't have symbolic links to places outside their home directory or have anything mounted under it.
The second should be a very rare situation. Still, do not run it as root. Only run this as the user of the home directory.
Edit: Explanation, the first line changes into the current user's home directory. You should be here already and you should really make sure you're the user and not root or someone else. Not all users want all their files to be world readable and may have changed the permissions on some.
The second line finds all the physical files and changes their permissions to the default.
The third finds all the directories and changes their permissions to the default.
Note: This
will break things. Some files and directories can not be world readable. "$HOME/.ssh/" for example and "$HOME/mbox", "$HOME/kde*", "$HOME/.gaim/", etc.
Almost all of these will warn you of this problem and suggest how to correct it. So if a program suddenly stops working... this is what to check. In the original problem, this problem would have already existed so it would not be a concern before running the original command(s). A little hand tweaking of a few things should be expected. But this gets the bulk of the work done.