After updating JSSImporter and python-jss we faced a problem with the "new" python-jss cookie jar temp file.
We have an AutoPkg setup with multiple macOS service accounts for different customers. When running the AutoPkg jss recipes as one user the temp file need to be deleted manually every time because other users don't have permission to delete it and it causes JSSImporter to choke.
Is it possible to move/add temp file deletion to JSSImporter "post" tasks or e.g. use a random name for the temp file?
Traceback for the file permission issue:
Traceback (most recent call last):
File "/usr/local/bin/autopkg", line 2758, in
sys.exit(main(sys.argv))
File "/usr/local/bin/autopkg", line 2754, in main
return subcommands[verb]"function"
File "/usr/local/bin/autopkg", line 2259, in run_recipes
autopackager.process(recipe)
File "/Library/AutoPkg/autopkglib/__init__.py", line 827, in process
processor = processor_class(self.env)
File "/Library/AutoPkg/autopkglib/JSSImporter.py", line 321, in __init__
os.remove(cookiejar)
PermissionError: [Errno 13] Permission denied: '/tmp/pythonjss_cookie_jar'
After updating JSSImporter and python-jss we faced a problem with the "new" python-jss cookie jar temp file.
We have an AutoPkg setup with multiple macOS service accounts for different customers. When running the AutoPkg jss recipes as one user the temp file need to be deleted manually every time because other users don't have permission to delete it and it causes JSSImporter to choke.
Is it possible to move/add temp file deletion to JSSImporter "post" tasks or e.g. use a random name for the temp file?
Traceback for the file permission issue: