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
PermissionError: [Errno 13] Permission denied: '/zap/wrk/ #6993
Comments
I'm not getting that error when running that command (the config and report are created). |
Reproduced this on ubuntu 20.04 as hosting environment. Working as expected on windows host. Did anyone figure out a work-around for this? |
Try this: That should create a file called That will use the image that zal2docker-stable uses. |
First image, Output:
|
Interesting. And does this work? |
I did some more testing with help of my private server (also ubuntu 20.04) on which everything worked as expected. Our not-working servers are Microsoft hosted machines in which we have some limitations/restrictions. |
So .. anyone think we need to do anything here (apart from better docs, which I'm working on) or can we close this now? |
In my mind @jamesregis observation is correct and it would be a lot nicer to make the In file '/zaproxy/zaproxy/blob/main/docker/Dockerfile-live' there is a part where folder permissions are set (92-99). Should /zap/wrk/ be added there? Something like |
But /zap/wrk does not (and I think cannot) exist in the docker image - it is only created as a result of mapping a drive to that path via the |
My tests show that it's ok if it exists but mapping it sets the owner to root anyway so that might just swallow other errors for when people forget to map it. Google indicates that setting a VOLUME does the trick, https://devops.stackexchange.com/questions/4540/how-to-change-the-owner-of-volume-directory-in-dockerfile. But I havn't been able to confirm that. I'm ok with closing this, since we found a work-around. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Describe the bug
The
'/zap/wrk/'
folder when mounted to docker container is unwritable by userzap
thus we are unable to write reports in this directory.To Reproduce
Steps to reproduce the behavior:
docker run -v $(pwd):/zap/wrk/:rw -t owasp/zap2docker-stable zap-baseline.py \ -t https://www.example.com -g gen.conf -r testreport.html
Running container content
Expected behavior
Whe should be able to go in the container and write in
/zap/wrk/
folder. Reports should be generated in the mounted folder.Screenshots
Software versions
Errors from the zap.log file
pastebin
Additional context
I was using docker and podman
Would you like to help fix this issue?
yes I would like to help.
The text was updated successfully, but these errors were encountered: