I am unsure if this is related to docker or ubuntu. I got a docker image from coworker and working inside it. I created a container based on the image with volume mapping to host system like docker run -it -v /data/dira:/dira image_from_coworker
, and tried to create new directory under /dira
using command mkdir /dira/test
, but it fails with permission denied message:
# inside the containerI have no name!@7aa44e2d4926:/dirk$ ls -ald /diradrwxrwxrwx+ 4 root root 4096 Jul 18 23:19 /diraI have no name!@7aa44e2d4926:/dirk$ mkdir /dira/testmkdir: cannot create directory '/dira/test': Permission deniedI have no name!@7aa44e2d4926:/dirk$ iduid=1000 gid=0(root) groups=0(root)
Since /dira
has 777 permission, as my best knowledge, anyone can access and write something under the directory. But I couldn't do. It is so strange. I also noticed there is +
symbol at /dira
and inspected the ACL, but there looked no special things.
# I checked the ACL from host since the guest doesn't have getfacl command installed.(base) $ getfacl /data/dira/# file: data/dira/# owner: root# group: rootuser::rwxgroup::r-xgroup:sudo:rwxmask::rwxother::rwxdefault:user::rwxdefault:group::r-xdefault:group:sudo:rwxdefault:mask::rwxdefault:other::r-x
Could anyone help me out with resolving this?
About the host and guest systems.
# host(base) $ uname -r6.5.0-35-generic(base) $ lsb_release -aNo LSB modules are available.Distributor ID: UbuntuDescription: Ubuntu 22.04.3 LTSRelease: 22.04Codename: jammy# guestI have no name!@7aa44e2d4926:/dirk$ uname -r6.5.0-35-genericI have no name!@7aa44e2d4926:/dirk$ lsb_release -aNo LSB modules are available.Distributor ID: UbuntuDescription: Ubuntu 20.04.5 LTSRelease: 20.04Codename: focal
More about the /data
: this directory is a hard drive mounted on the host system.
(base) $ df -hFilesystem Size Used Avail Use% Mounted ontmpfs 26G 11M 26G 1% /run/dev/mapper/vgubuntu-root 1.7T 1.4T 278G 84% /tmpfs 126G 0 126G 0% /dev/shmtmpfs 5.0M 4.0K 5.0M 1% /run/lockefivarfs 128K 31K 93K 25% /sys/firmware/efi/efivars/dev/nvme0n1p1 511M 6.1M 505M 2% /boot/efi/dev/sda1 7.0T 4.9T 1.8T 74% /data...
Thanks for your concerning!