I want to remove all write access to files & directories for any user or group while preserving other permissions. Is this possible?
setfacl remove all write access
linux;files;filesystems;acl
If you want to remove write access from everyone, you don't need ACLs: traditional permissions will do.chmod -R a-w /path/to/directoryNote that users can change back the permissions of the files that they own (this would also apply to anything you do with ACL).If you wanted to use ACL in order to preserve the traditional permissions of the files, you'd have to list every user of the system, or at least every group.If the filesystem is ext2/ext3/ext4, you can set the immutable attribute. Only root can change the immutable attribute, and it prevents all writes.chattr -R +i /path/to/directoryThere's a good chance that your problem can be solved by mounting the directory in a private location and exposing a read-only view through bindfs. See read only access to all files in a specific sub-folder