Bad permissions inside the container

Hi I see weird things inside the container in terms of permissions, look at this output:

[root@docker-vm vaultwarden]# docker exec -it vaultwarden /bin/bash
root@8bde8ab79031:/# ls -la
ls: cannot access 'opt': Operation not permitted
ls: cannot access '..': Operation not permitted
ls: cannot access 'usr': Operation not permitted
ls: cannot access 'lib': Operation not permitted
ls: cannot access 'proc': Operation not permitted
ls: cannot access 'bin': Operation not permitted
ls: cannot access 'srv': Operation not permitted
ls: cannot access '.': Operation not permitted
ls: cannot access 'sbin': Operation not permitted
ls: cannot access 'root': Operation not permitted
ls: cannot access 'home': Operation not permitted
ls: cannot access 'lib64': Operation not permitted
ls: cannot access 'etc': Operation not permitted
ls: cannot access 'run': Operation not permitted
ls: cannot access 'boot': Operation not permitted
ls: cannot access 'dev': Operation not permitted
ls: cannot access 'mnt': Operation not permitted
ls: cannot access 'sys': Operation not permitted
ls: cannot access 'var': Operation not permitted
ls: cannot access 'media': Operation not permitted
ls: cannot access 'tmp': Operation not permitted
ls: cannot access 'config': Operation not permitted
ls: cannot access '.dockerenv': Operation not permitted
ls: cannot access 'start.sh': Operation not permitted
ls: cannot access 'healthcheck.sh': Operation not permitted
ls: cannot access 'vaultwarden': Operation not permitted
ls: cannot access 'web-vault': Operation not permitted
ls: cannot access 'data': Operation not permitted
total 0
d????????? ? ? ? ?            ? .
d????????? ? ? ? ?            ? ..
-????????? ? ? ? ?            ? .dockerenv
d????????? ? ? ? ?            ? bin
d????????? ? ? ? ?            ? boot
d????????? ? ? ? ?            ? config
d????????? ? ? ? ?            ? data
d????????? ? ? ? ?            ? dev
d????????? ? ? ? ?            ? etc
-????????? ? ? ? ?            ? healthcheck.sh
d????????? ? ? ? ?            ? home
d????????? ? ? ? ?            ? lib
d????????? ? ? ? ?            ? lib64
d????????? ? ? ? ?            ? media
d????????? ? ? ? ?            ? mnt
d????????? ? ? ? ?            ? opt
d????????? ? ? ? ?            ? proc
d????????? ? ? ? ?            ? root
d????????? ? ? ? ?            ? run
d????????? ? ? ? ?            ? sbin
d????????? ? ? ? ?            ? srv
-????????? ? ? ? ?            ? start.sh
d????????? ? ? ? ?            ? sys
d????????? ? ? ? ?            ? tmp
d????????? ? ? ? ?            ? usr
d????????? ? ? ? ?            ? var
-????????? ? ? ? ?            ? vaultwarden
d????????? ? ? ? ?            ? web-vault

I suspect something is messed up with permissions, I run the container as root and I access the container as root.

Reminds me of root user has no permissions within container · Issue #884 · docker-library/postgres · GitHub
What OS / docker version are you using?

Hi! Thanks for your answer, I’m running Docker version 19.03.2, build 6a30dfc on a CentOS 7