Permission denied to read disk
- [x] This is a bug report
- [ ] This is a feature request
- [x] I searched existing issues before opening this one
Expected behavior
I expect to be able to read data from container's disk
Actual behavior
I am able to write data, but I'm unable to read data.
Steps to reproduce the behavior
docker run -it ubuntu:focal
bash: /root/.bashrc: Permission denied
root@fc3ea932ffd9:/# apt update
W: Unable to read /etc/apt/apt.conf.d/01-vendor-ubuntu - open (13: Permission denied)
W: Unable to read /etc/apt/apt.conf.d/01autoremove - open (13: Permission denied)
W: Unable to read /etc/apt/apt.conf.d/01autoremove-kernels - open (13: Permission denied)
W: Unable to read /etc/apt/apt.conf.d/70debconf - open (13: Permission denied)
W: Unable to read /etc/apt/apt.conf.d/docker-autoremove-suggests - open (13: Permission denied)
W: Unable to read /etc/apt/apt.conf.d/docker-clean - open (13: Permission denied)
W: Unable to read /etc/apt/apt.conf.d/docker-gzip-indexes - open (13: Permission denied)
W: Unable to read /etc/apt/apt.conf.d/docker-no-languages - open (13: Permission denied)
E: Error reading the CPU table
root@5fa74bd30324:/# echo "testing" > docker.txt
root@5fa74bd30324:/# cat docker.txt
cat: docker.txt: Permission denied
Output of docker version:
Client:
Version: 18.09.9
API version: 1.39
Go version: go1.13.4
Git commit: 1752eb3
Built: Sat Nov 16 01:05:26 2019
OS/Arch: linux/amd64
Experimental: false
Server:
Engine:
Version: 18.09.9
API version: 1.39 (minimum version 1.12)
Go version: go1.13.4
Git commit: 9552f2b
Built: Sat Nov 16 01:07:48 2019
OS/Arch: linux/amd64
Experimental: false
Output of docker info:
Containers: 6
Running: 1
Paused: 0
Stopped: 5
Images: 4
Server Version: 18.09.9
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 894b81a4b802e4eb2a91d1ce216b8817763c29fb
runc version: N/A
init version: fec3683
Security Options:
apparmor
seccomp
Profile: default
Kernel Version: 5.4.0-31-generic
Operating System: Ubuntu Core 16
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 7.503GiB
Name: xps13
ID: C75J:HW5H:T4BW:D7TM:DGZZ:2YRT:H24U:RHJC:NWYW:GRYD:GECG:FS2D
Docker Root Dir: /var/snap/docker/common/var-lib-docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
WARNING: No swap limit support
Additional environment details (AWS, VirtualBox, physical, etc.)
Linux xps13 5.4.0-31-generic #35-Ubuntu SMP Thu May 7 20:20:34 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Yesterday everything worked fine, today, after updating the Linux Kernel, this happened.
Yesterday everything worked fine, today, after updating the Linux Kernel, this happened.
Yes, for me it's the same
Did the Kernel update on Ubuntu and can't run any docker build command, because it's always "Permission denied"
Update:
did curl -fsSL https://get.docker.com | bash again and it's now working
I'm not able to reproduce this on a current (19.03.9 at time of writing) version of docker, running on a 5.4 kernel;
docker run -it ubuntu:focal
Unable to find image 'ubuntu:focal' locally
focal: Pulling from library/ubuntu
Digest: sha256:8bce67040cd0ae39e0beb55bcb976a824d9966d2ac8d2e4bf6119b45505cee64
Status: Downloaded newer image for ubuntu:focal
root@61bcf2e465cc:/# echo "testing" > docker.txt
root@61bcf2e465cc:/# cat docker.txt
testing
@Tobix99 docker 18.09.x community edition reached EOL (and afaik, was not tested/verified on 5.x kernels).
- Did you restart your machine after upgrading the kernel? (kernel upgrades may require a reboot)
- Are you still able to reproduce on a current version of docker?
I have restarted the machine (several times, after each install). I have removed docker 18 and tried docker 19, from snap store, with the same results. here we are on docker 19:
sudo snap remove docker
sudo snap install docker --edge
docker (edge) 19.03.8 from Canonical✓ installed
Docker version
Client:
Version: 19.03.8
API version: 1.40
Go version: go1.12.17
Git commit: eb310fc
Built: Fri May 8 19:38:49 2020
OS/Arch: linux/amd64
Experimental: false
Server:
Engine:
Version: 19.03.8
API version: 1.40 (minimum version 1.12)
Go version: go1.12.17
Git commit: aa6a989
Built: Fri May 8 19:41:43 2020
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: v1.2.13
GitCommit: 7ad184331fa3e55e52b890ea95e65ba581ae3429
runc:
Version: 1.0.0-rc10
GitCommit:
docker-init:
Version: 0.18.0
GitCommit: fec3683
Docker Info
Client:
Debug Mode: false
Server:
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 0
Server Version: 19.03.8
Storage Driver: overlay2
Backing Filesystem: <unknown>
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 7ad184331fa3e55e52b890ea95e65ba581ae3429
runc version:
init version: fec3683
Security Options:
apparmor
seccomp
Profile: default
Kernel Version: 5.4.0-31-generic
Operating System: Ubuntu Core 16
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 7.503GiB
Name: xps13
ID: JTF5:XCC6:H744:OOBU:FA5X:TVGY:STEM:Z76D:UTC5:BI6W:GCID:YEGG
Docker Root Dir: /var/snap/docker/common/var-lib-docker
Debug Mode: false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
WARNING: No swap limit support
Retrying:
docker run -it ubuntu:focal
bash: /root/.bashrc: Permission denied
root@1c875c50dc98:/# echo "testing" > docker.txt
root@1c875c50dc98:/# cat docker.txt
cat: docker.txt: Permission denied
root@1c875c50dc98:/#
I have reported this issue to Ubuntu as well. Maybe it's something with the last kernel.
Probably related to snap.
I'm not able to reproduce this on a current (19.03.9 at time of writing) version of docker, running on a 5.4 kernel;
docker run -it ubuntu:focal Unable to find image 'ubuntu:focal' locally focal: Pulling from library/ubuntu Digest: sha256:8bce67040cd0ae39e0beb55bcb976a824d9966d2ac8d2e4bf6119b45505cee64 Status: Downloaded newer image for ubuntu:focal root@61bcf2e465cc:/# echo "testing" > docker.txt root@61bcf2e465cc:/# cat docker.txt testing@Tobix99 docker 18.09.x community edition reached EOL (and afaik, was not tested/verified on 5.x kernels).
* Did you restart your machine after upgrading the kernel? (kernel upgrades may require a reboot) * Are you still able to reproduce on a current version of docker?
Hey @thaJeztah,
I'm not sure what version of Docker I was using before I run the (curl and bash) command, but I'm currently running Docker version 19.03.9, build 9d988398e7 and can't reproduce the error anymore. The Version before was also installed via this script.
I've also restarted multiple times.
I have removed docker 18 and tried docker 19, from snap store, with the same results. here we are on docker 19:
Ahm, yes, I think there's issues with the snap installs. Those are built and maintained by Canonical, so I don't think we'd be able to help with those. If possible, I'd recommend trying to install the official packages instead (https://docs.docker.com/engine/install/ubuntu/).
Let me close this ticket because of the above, but feel free to continue the conversation
I have removed docker 18 and tried docker 19, from snap store, with the same results. here we are on docker 19:
Ahm, yes, I think there's issues with the snap installs. Those are built and maintained by Canonical, so I don't think we'd be able to help with those. If possible, I'd recommend trying to install the official packages instead (https://docs.docker.com/engine/install/ubuntu/).
Let me close this ticket because of the above, but feel free to continue the conversation
I has similar issue, couldn't build images. Seems like error was with snap install. I installed again using official repo, worked like charm.
Same issue here. Broken on Ubuntu 20.04
I was encountering the same issue when attempting to build and run my application. I was unable to run basic commands like docker images without throwing errors. I reverted from Docker version 19.03.9, build 9d988398e7 to Docker version 19.03.8, build afacb8b7f0 and was still experiencing this issue. It turns out the following command fixed the issue:
sudo systemctl restart docker
After restarting docker, I was able to bring up my container without issue.