After I apply
chmod -R to a directory, permissions are changed for everything within (files and directories). How can I add execute/search (
x) permissions to directories without modifying the files?
You can use find.
Where 750 is the mode you'd like to apply and "./" is the directory you will recursively search.
EDIT: Thanks to @Gilles and find(1), I've revised this for additional security and performance.
In this particular case you can use
In general (e.g. if you wanted to make all directories readable without affecting the files), you could either use