I'm Jason, a web applications developer in the Denver, Colorado area.

Fixing file and directory permissions recursively

Often I find myself downloading ZIP files, and after unarchiving them all the files have totally incorrect permissions such as 777 for all files and folders.

Go into the directory main directory at the top of the file/folder hierarchy and run the following commands to resolve this:

find . -type d -exec chmod 0755 {} \;
find . -type f -exec chmod 0644 {} \;
comments powered by Disqus