No access rights in Docker Container when using SLES15 and *Suse Container
Asked Answered
C

2

1

I am running Docker 18.09.6 on SLES15 (GNU/Linux 4.12.14). When starting any suse container leap/tumbleweed or sle15 I do not have proper access rights to see ls -l. Other Container Images like Alpine and Ubuntu work without a problem. In both cases I am id -u = 0 and root according to whoami.

Sample:

275b1cf2bd20:/ # ls -l
ls: cannot access 'sbin': Operation not permitted
ls: cannot access 'sys': Operation not permitted
ls: cannot access 'usr': Operation not permitted
ls: cannot access 'proc': Operation not permitted
ls: cannot access 'bin': Operation not permitted
ls: cannot access 'tmp': Operation not permitted
ls: cannot access 'selinux': Operation not permitted
ls: cannot access 'boot': Operation not permitted
ls: cannot access 'home': Operation not permitted
ls: cannot access 'root': Operation not permitted
ls: cannot access 'dev': Operation not permitted
ls: cannot access 'var': Operation not permitted
ls: cannot access 'run': Operation not permitted
ls: cannot access 'lib64': Operation not permitted
ls: cannot access 'opt': Operation not permitted
ls: cannot access 'srv': Operation not permitted
ls: cannot access 'mnt': Operation not permitted
ls: cannot access 'lib': Operation not permitted
ls: cannot access 'etc': Operation not permitted
total 0
d????????? ? ? ? ?            ? bin
d????????? ? ? ? ?            ? boot
d????????? ? ? ? ?            ? dev
d????????? ? ? ? ?            ? etc
d????????? ? ? ? ?            ? home
d????????? ? ? ? ?            ? lib
d????????? ? ? ? ?            ? lib64
d????????? ? ? ? ?            ? mnt
d????????? ? ? ? ?            ? opt
d????????? ? ? ? ?            ? proc
d????????? ? ? ? ?            ? root
d????????? ? ? ? ?            ? run
d????????? ? ? ? ?            ? sbin
d????????? ? ? ? ?            ? selinux
d????????? ? ? ? ?            ? srv
d????????? ? ? ? ?            ? sys
d????????? ? ? ? ?            ? tmp
d????????? ? ? ? ?            ? usr
d????????? ? ? ? ?            ? var

What is happening here?

Ceramic answered 31/10, 2021 at 11:57 Comment(0)
S
1

I faced similar issue when I was trying to run SLES based container on different host machine ( i.e. host machine having different OS than SLES)

If docker image and host machine are based on same OS, then it should not have permission issue with ls -l or ls -n

Scream answered 25/1, 2022 at 20:19 Comment(1)
This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From ReviewHeilbronn
K
0

This seems to be linked to an update in Linux kernel version in opensuse:leap, debian:bullseye, etc: all further version of these OS are also concerned.

github.com user tianon recommend updating "Docker, runc, and likely libseccomp on your host." source: https://github.com/docker-library/openjdk/issues/465

Upgrading of libseccomp to version 2.5.2 solved the same problem on my side.

source: https://github.com/seccomp/libseccomp/blob/main/CHANGELOG

Katherinkatherina answered 28/3, 2022 at 13:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.