Reversing file permissions

Sometimes there is a need to temporary change the permissions of a bunch a files. And perhaps after that you’d want to restore them to their previous settings. A nice little tool for this is ACL.

By first getting all the permissions files in a directory (including sub-directories) using the follwing snipper:

Then one can do whatever changes using chmod or chown. To restore permissions one can simple use:

Quite nifty.

All credits go to user durandal on stackoverflow