Permission denied error occurs on shell script after macos update to sonoma from ventura
I have developed a macos app.
in the app, launchd .plist file to run a shell script. (.plist file's location is /Library/LaunchAgents/)
In the script, I use below code to output log info.
Before update to sonoma , it worked well.
local FileLogsTask="/var/log/my_task.log"
echo ${Timestamp}:${Msg} >> "${FileLogsTask}"
After updated to sonoma.
- I found old my_task.log was lost
- After script is executed, my_task.log was not created
- 「/var/log/my_task.log: Permission denied」error is outputted
Has anyone encountered similar problems, know how to solve this problem?
MacBook Pro (M1, 2020)