docker-scikit-learn icon indicating copy to clipboard operation
docker-scikit-learn copied to clipboard

Permission denied error

Open larrycai opened this issue 7 years ago • 6 comments

In one old docker server, I got permission error "Permission denied: Untitled.ipynb"

  • docker version: 1.13.1 (can't change so far)
  • docker host server: Ubuntu 16.04

error from console is

[I 13:41:04.238 NotebookApp] Creating new notebook in
...
[W 13:43:19.126 NotebookApp] 403 GET /api/sessions?_=1527255637897 (x.x.x.x) 1.60ms referer=http://x.x.x.x:8888/tree?
[W 13:43:19.135 NotebookApp] Forbidden

While it works fine in my local docker @ Windows 7

  • docker version: 18.01.0-ce

larrycai avatar May 25 '18 14:05 larrycai

Hi @larrycai,

Could you show me the result of the below cmd?

$ docker exec <container_id> ls -ld /code

smizy avatar May 26 '18 05:05 smizy

The success one is

/code # ls -ld
drwxrwxrwx    1 docker   50               0 May 27 20:16 .

The failure one is

/code # ls -ld
drwxr-xr-x    2 root     root          4096 May 27 20:12 .

UPDATE, when I try again for failure one, it is

drwxrwxr-x    2 docker   docker        4096 May 28 06:59 .

larrycai avatar May 27 '18 20:05 larrycai

@larrycai hmm, Do you use workdir not /code but any other directory or don't use local volume mount option?

smizy avatar May 27 '18 23:05 smizy

I mounted the folder from host to /code , like -v $PWD/scikit:/code, I guess it is a bug/permission issue in Dockerfile, which I met before.

I will also try to see whether I can provide patch to fix it.

larrycai avatar May 28 '18 06:05 larrycai

I am not sure whether you can add jupyter into docker group as well, I tested below works

FROM smizy/scikit-learn
RUN addgroup jupyter docker
ENTRYPOINT ["/sbin/tini", "--", "entrypoint.sh"]
CMD ["jupyter", "notebook"]

larrycai avatar May 28 '18 11:05 larrycai

I fixed in another branch "fix_permission_denied" without rebuilding dependency libs. And docker image tag "smizy/scikit-learn:0.19.1-alpine-r1". Please give it a try.

smizy avatar May 28 '18 20:05 smizy