Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.
This repository was archived by the owner on May 28, 2025. It is now read-only.

File permission issue with the /tmp/pythonjss_cookie_jar file #193

Description

@jlehikoinen

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'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions