---

How to back up and restore file permissions on Linux

There are cases where you want to temporarily back up file permissions alone (not files themselves). For example, you want to prevent the content of some directory from being overwritten, so you temporarily remove write permission on all the files under the directory. Or you are troubleshooting file permission issues, and so running chmod on files here and there. On Linux, it is actually straightforward to back up and restore file permissions using access control list (ACL).