File permissions on html server (recursive chmod) differentiating between files and directories

Last modified on July 24, 2026 • 1 min read • 50 words
I recursively screwed up the file permissions in my html servers root directory.
I recursively screwed up the file permissions in my html servers root directory. To fix it I needed to deploy some “advanced” chmod settings. Obviously I want to treat directories and files differently. I didn’t come up with a better solution than the following:chmod -R u=rw-x,g=rw-x,o=r-wx *chmod -R a+X *