adminscripts icon indicating copy to clipboard operation
adminscripts copied to clipboard

Permission denied: '/Library/Managed Installs/ConditionalItems.plist'

Open nilsbyte opened this issue 7 years ago • 0 comments

I have set update_munki_conditional_items to True. I noticed that the file /Library/Managed Installs/ConditionalItems.plistwas not created after running managedsoftwareupdate. The same does happen (or not) when running the GUI.

I ran the script manually and got this error.

Traceback (most recent call last):
  File "/usr/local/munki/conditions/check-10.13-highsierra-compatibility.py", line 335, in <module>
    sys.exit(main())
  File "/usr/local/munki/conditions/check-10.13-highsierra-compatibility.py", line 326, in main
    append_conditional_items(high_sierra_supported_dict)
  File "/usr/local/munki/conditions/check-10.13-highsierra-compatibility.py", line 302, in append_conditional_items
    plistlib.writePlist(output_dict, current_conditional_items_path)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plistlib.py", line 90, in writePlist
    pathOrFile = open(pathOrFile, "w")
IOError: [Errno 13] Permission denied: '/Library/Managed Installs/ConditionalItems.plist'

Running the same with sudo creates the file. Whats wrong?

Permissions look correct:

-rwxr-xr-x  1 root  wheel  10389 27 Jul 15:37 check-10.13-highsierra-compatibility.py

nilsbyte avatar Jul 27 '18 13:07 nilsbyte