During development and debugging I have changed permissions of various files and folders using chown and chmod on my local system (I didnt maintain the list of changes). Now that I have fixed the issue, i fear of security consequences.
Any way I could restore the default permissions and/or find vulnerabilities in terms of network security or other potential loop holes that might create due to my changes.
MacOS – How to reset to default permissions on El Capitan
macospermissionSecurityunix
Related Question
- MacOS – Reset AFP permissions after uninstalling Mavericks Server
- MacOS – Questions about permissions, specifically across machines
- How to reset default permissions after the result of running the chown command
- MacOS – How to Restore the Default Permissions in Sierra
- MacOS – How to see 6-digit file permissions
- MacOS – Reset All Mojave App Permissions
- MacOS File Permissions Reset After Writing
- MacOS – Revert or reset permissions of extensions
Best Answer
For system installed packages you can run the following command in Terminal.app to find permissions that differ from the default:
If you want to just apply those permissions to your system as a whole, run the following command:
Or you could individually fix the permissions that you have changed yourself using chmod/chown.
For everything else, you need to have used either a package manager that can verify permissions, or have a backup you can use for comparing permissions before and after the event.
For others: Please note that the repair_packages command no longer exists in Sierra and newer macOS versions, as they now automatically handle repairing permissions. If you have manually messed up permissions so much that they cannot be fixed automatically, I would recommend restoring permissions from a Time Machine backup or similar.