Setting File and Directory Permissions Recursively on Linux
This is always a handy set of commands to have laying around. There are many sites that provide the same info, but I use it often enough that I thought I would put it up to have it handy for me as well. If you accidentally reset a bunch of file or folder permissions or have a script that does it for you. These commands can be a lifesaver.
To set permissions recursively on files:
find . -type f -exec chmod 664 {} \;
To set permissions recursively on folders:
find . -type d -exec chmod 775 {} \;
0 Comments