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

Podman/Mac OSX, audit -f, getting Permission denied error /tmp/packj #42

Open
chrisshino opened this issue Apr 12, 2023 · 1 comment
Open

Comments

@chrisshino
Copy link

Describe the bug

While testing out the container way of running packj locally on my macbook with podman I ran into this issue:

The docs say: docker run -v /tmp:/tmp/packj -it ossillate/packj:latest --help, it's also the "recommended way" currently.

When trying to audit:

podman run -v /tmp:/tmp/packj:w -it ossillate/packj:latest audit -f npm:./package.json

we get - Failed to create temp dir: [Errno 13] Permission denied: '/tmp/packj/packj_audit_dctc3110'!

Possible fixes:

  1. find out how to give the container permission to write to /tmp dir, the current User is Ubuntu, maybe we just need to give them write perms.

  2. Allow users to specify the path they want to use for writing out the audits too, in this code its currently hardcoded:

    container_mountpoint = '/tmp/packj'

it would be nice if users were able to also select where to write the audits too?

@chrisshino
Copy link
Author

oh another easy workaround actually was doing:

podman run -v $(pwd)/tmp:/tmp/packj -it --user=root ossillate/packj:latest audit -f npm:./package.json

so not using /tmp in the host + adding --user flag, could probably just update the docs to recommend this!

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