Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jlehikoinen opened this issue Sep 13, 2021 · 0 comments
Open

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

jlehikoinen opened this issue Sep 13, 2021 · 0 comments

Comments

@jlehikoinen
Copy link

jlehikoinen commented Sep 13, 2021

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'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant