We need to scan newly created or modified files for malware. To achieve this, we added a plist file in the /Library/LaunchDaemons directory and intended to use a daemon process to perform the scans. However, we have encountered an issue where the daemon process cannot access files within Home subfolders such as ~/Downloads/ and ~/Documents/.
When running the process as a user, it fails to scan some files due to lack of read permissions. Conversely, when running the process as root, it cannot scan files in the Home subfolders due to privacy restrictions.
Could you please advise on the best approach to achieve this configuration?
When running the process as a user, it fails to scan some files due to lack of read permissions. Conversely, when running the process as root, it cannot scan files in the Home subfolders due to privacy restrictions. Could you please advise on the best approach to achieve this configuration?
The "Full Disk Access" authorization exists to facilitate the sort of thing you're describing. It disable the user privacy protection that's blocking access above. You can find the Full Disk Access setting in "System Settings > Privacy & Security > Privacy".
Also, on a side note, what you're describing here is no longer the correct approach:
To achieve this, we added a plist file in the /Library/LaunchDaemons directory
LaunchDaemon's should remain embedded inside their parent app bundle and managed through "SMAppService".
__
Kevin Elliott
DTS Engineer, CoreOS/Hardware