Skip to content

failed to open stream: Permission denied #41

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

Closed
rvernica opened this issue Apr 12, 2018 · 8 comments
Closed

failed to open stream: Permission denied #41

rvernica opened this issue Apr 12, 2018 · 8 comments

Comments

@rvernica
Copy link

rvernica commented Apr 12, 2018

I got the latest Docker image from Docker Hub:

> docker run --rm -it --name dcv -v $(pwd):/input:rw pmsipilot/docker-compose-viz
Warning: file_put_contents(/input/docker-compose.png): failed to open stream: Permission denied in /dcv/src/application.php on line 137

I copied the docker-compose.yml to /tmp did chmod a+r on it, and ran the docker run command there. It worked fine.

This is due to specifying the dcv username in Dockerfile. It is easy to fix by not imposing a username and having the root user being used.

This issue was mentioned before in #21, but as part of a separate thread.

@markiewb
Copy link
Contributor

I also had to create a subfolder to get it working

mkdir output && chmod 777 output
docker run --rm -it --network none -v $(pwd):/input:rw pmsipilot/docker-compose-viz render -m image --output-file output/docker-compose.yml.png docker-compose.yml 

@thamerbelfkihthamer
Copy link

there is no one able to resolve this issue?

@markiewb
Copy link
Contributor

@thamerbelfkihthamer Have you tried my approach above? It had worked for me this way...

@pengyuan-zhou
Copy link

docker run --rm -it --network none -v $(pwd):/input:rw pmsipilot/docker-compose-viz render -m image --output-file output/docker-compose.yml.png docker-compose.yml

works like a charm

@jubianchi
Copy link
Member

Hi everyone here! 👋🏻

I just added the "help wanted" label: if anyone wants to contribute something in the README, like a "Caveats" paragraph explaining this kind of problems and how to solve them it would be really apreciated.

I can't actually reproduce the problem (I'm working on MacOS with Docker For Mac) and never had any problem so I don't think I will be able to provide the best solution here.

Thank you all 🙏

@pengyuan-zhou
Copy link

Hi everyone here! 👋🏻

I just added the "help wanted" label: if anyone wants to contribute something in the README, like a "Caveats" paragraph explaining this kind of problems and how to solve them it would be really apreciated.

I can't actually reproduce the problem (I'm working on MacOS with Docker For Mac) and never had any problem so I don't think I will be able to provide the best solution here.

Thank you all 🙏

Hi, I met this today on ubuntu 16.04, no specific reason noticed, and I just used the command suggested by @markiewb then solved. If helpful, I can add this into README, or better, if @markiewb would.

markiewb added a commit to markiewb/docker-compose-viz that referenced this issue Jul 29, 2020
It has been proposed by others to include it in the readme.md
@markiewb
Copy link
Contributor

Proposed as MR #51

jubianchi pushed a commit that referenced this issue Jul 29, 2020
It has been proposed by others to include it in the readme.md
@jubianchi
Copy link
Member

jubianchi commented Jul 29, 2020

Thanks @pengyuan-zhou for confirming @markiewb solution.

The MPR has been merged.

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

No branches or pull requests

5 participants