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

EACCES: permission denied, open '/home/marp/app/untitled.pdf' #79

Closed
GreenHatHG opened this issue Apr 3, 2019 · 7 comments
Closed

EACCES: permission denied, open '/home/marp/app/untitled.pdf' #79

GreenHatHG opened this issue Apr 3, 2019 · 7 comments
Labels
question 🙅 Not issue, just a question (should post to Marp discussion)

Comments

@GreenHatHG
Copy link

GreenHatHG commented Apr 3, 2019

When I try to use it by docker, it gives me an error.
I'd really appreciate it if you could help me with this problem


Docker version 18.09.4, build d14af54

@yhatt yhatt added question 🙅 Not issue, just a question (should post to Marp discussion) help wanted Extra attention is needed labels Apr 3, 2019
@yhatt
Copy link
Member

yhatt commented Apr 4, 2019

It should doubt permission or owner of directories. (ls -la | grep ^d)

It's not the best answer but adding --privileged option instead of running with sudo might be help you.

@yhatt
Copy link
Member

yhatt commented Apr 11, 2019

We close this issue that has no progress for a week. Please report more information by executing the presented command if still troubling now.

@yhatt yhatt closed this as completed Apr 11, 2019
@yhatt yhatt removed the help wanted Extra attention is needed label Apr 11, 2019
@d0ugal
Copy link

d0ugal commented Jul 2, 2019

I hit the same problem, to work around it I changed the container user. Note -u "node" below.

docker run -u "node" --rm -v $PWD:/home/marp/app/ -e LANG=$LANG marpteam/marp-cli pres.md --pdf

To figure this out I ran the container with a custom entry point to get shell access and see which user had permissions over /home/marp/app

$  docker run --entrypoint "sh" -it -v $PWD:/home/marp/app/ -e LANG=$LANG marpteam/marp-cli
~/app $ pwd
/home/marp/app
~/app $ ls -la
total 256
drwxr-xr-x    3 node     node          4096 Jul  2 09:06 .
drwxr-sr-x    1 marp     marp          4096 Jul  2 09:20 ..
-rw-r--r--    1 node     node           857 Jul  1 13:34 notes.txt
-rw-r--r--    1 node     node          3150 Jul  2 09:09 pres.md

@d0ugal
Copy link

d0ugal commented Jul 2, 2019

It's not the best answer but adding --privileged option instead of running with sudo might be help you.

Oh, I forgot to mention in my previous comment that I tried this and it didn't help

@yhatt
Copy link
Member

yhatt commented Jul 2, 2019

If you think Marp CLI's Docker image is assigning marp user meaningless, you may send pull request.

USER marp

UPDATE: It seems to be better following Puppeteer's best practice to run in Docker. We have to research about user permission of mounted directory.

@yhatt
Copy link
Member

yhatt commented Jul 2, 2019

An useful tips: https://denibertovic.com/posts/handling-permissions-with-docker-volumes/

@pestophagous
Copy link

I also just encountered this same issue. Here is another workaround:

mkdir directory_anyone_writes_to
cp Downloads/index.md ~/directory_anyone_writes_to/ # put your md file in there
chmod -R 0777 directory_anyone_writes_to/  # grant very loose permission
cd directory_anyone_writes_to/
docker run --rm --init -v $PWD:/home/marp/app/ -e LANG=$LANG marpteam/marp-cli index.md --pdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question 🙅 Not issue, just a question (should post to Marp discussion)
Projects
None yet
Development

No branches or pull requests

4 participants