permission denied while creating volume path
See original GitHub issueDescribe the bug
Workspace is not starting and report “timeout” In workspace pod events we can see
Error: Error response from daemon: create b72f86e6ddffd62eaaa51d33db4b993d11c88396309d735678899fddfc10ab2f: error while creating volume path '/var/lib/docker/volumes/b72f86e6ddffd62eaaa51d33db4b993d11c88396309d735678899fddfc10ab2f/_data': mkdir /var/lib/docker/volumes/b72f86e6ddffd62eaaa51d33db4b993d11c88396309d735678899fddfc10ab2f: permission denied
Here is the dockerfile of the container image used:
FROM centos:8
RUN mkdir -p /foo && chmod 777 /foo && chgrp 0 /foo; chmod g+rwX /foo
VOLUME /foo
CMD tail -f /dev/null
The main error is coming with the VOLUME instruction
Che version
- latest
- nightly
- other: please specify : che.openshift.io
Steps to reproduce
Expected behavior
Workspace is able to start
Runtime
- kubernetes (include output of
kubectl version
) - Openshift (include output of
oc version
) - minikube (include output of
minikube version
andkubectl version
) - minishift (include output of
minishift version
andoc version
) - docker-desktop + K8S (include output of
docker version
andkubectl version
) - other: che.openshift.io
Screenshots
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Permission denied on accessing host directory in Docker
This happens when the volume is empty and the container is created with the named volume. macOS users now have OSXFS which handles...
Read more >Docker Files and Volumes: Permission Denied
Encountered a 'Permission Denied' error on a file copied to a Docker image or when accessing a file on a mounted volume within...
Read more >Permission denied with volumes : r/docker - Reddit
Whenever I try to write a file in the data folder, which is bound to a volume, it errors with permission denied. What...
Read more >Container permission denied: How to diagnose this error
Usually, the problem is a non-root user inside a container, say the MySQL UID 999, trying to access a volume mounted from the...
Read more >Troubleshooting Common Problems - Jupyter Docker Stacks
Permission denied when mounting volumes# ; CHOWN_EXTRA=<some-dir>,<some-other-dir> : will change the ownership and group of the specified container directory ( ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is an OpenShift issue – any container that has a VOLUME directive in its dockerfile has to have a corresponding volumeMount.
The solution is to add a volume to the devfile:
There’s not a whole lot we can do on the Che side automatically here. Without a volumeMount, there’s no good way to determine where to allocate the storage for the container, and without the dockerfile there’s no way to know which volumes we need to add.
Issues go stale after
180
days of inactivity.lifecycle/stale
issues rot after an additional7
days of inactivity and eventually close.Mark the issue as fresh with
/remove-lifecycle stale
in a new comment.If this issue is safe to close now please do so.
Moderators: Add
lifecycle/frozen
label to avoid stale mode.