I have an a macOS launch daemon running via a plist in /Library/LaunchDaemons. This process runs under a specific user id via the UID key, this user belongs to the group 'staff'.
This process creates a directory under /Library/Logs and /Library/Caches, these directories have the expected ownership of my_user:staff.
Any files the process creates in those directories have ownership root:staff. I'm not doing anything special when creating the files and I'm not specifying any specific permissions. Is this expected behaviour? Any if so why? Is it a result of these being system locations that can be purged by the OS?
I don't appear to have any issues writing to these files.
Thanks,
Gary.
This process creates a directory under /Library/Logs and /Library/Caches, these directories have the expected ownership of my_user:staff.
Any files the process creates in those directories have ownership root:staff. I'm not doing anything special when creating the files and I'm not specifying any specific permissions. Is this expected behaviour? Any if so why? Is it a result of these being system locations that can be purged by the OS?
I don't appear to have any issues writing to these files.
Thanks,
Gary.