Forum Stats

  • 3,771,060 Users
  • 2,253,215 Discussions
  • 7,875,726 Comments

Discussions

Docker image oraclelinux:8: ls shows "Operation not permitted"

user755585-Oracle
user755585-Oracle Member Posts: 2 Employee
$ docker run -it --rm container-registry.oracle.com/os/oraclelinux:8 bash
[[email protected] /]# ls -l /
ls: cannot access '/': Operation not permitted
[[email protected] /]# ls
ls: cannot access 'bin': Operation not permitted
ls: cannot access 'boot': Operation not permitted
ls: cannot access 'dev': Operation not permitted
ls: cannot access 'etc': Operation not permitted
ls: cannot access 'home': Operation not permitted
ls: cannot access 'lib': Operation not permitted
ls: cannot access 'lib64': Operation not permitted
ls: cannot access 'media': Operation not permitted
ls: cannot access 'mnt': Operation not permitted
ls: cannot access 'opt': Operation not permitted
ls: cannot access 'proc': Operation not permitted
ls: cannot access 'root': Operation not permitted
ls: cannot access 'run': Operation not permitted
ls: cannot access 'sbin': Operation not permitted
ls: cannot access 'srv': Operation not permitted
ls: cannot access 'sys': Operation not permitted
ls: cannot access 'tmp': Operation not permitted
ls: cannot access 'usr': Operation not permitted
ls: cannot access 'var': Operation not permitted
bin  boot  dev  etc  home  lib  lib64  media  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var

This seems to be related to the bug https://bugzilla.redhat.com/show_bug.cgi?id=1764152

[[email protected] /]# rpm -qa coreutils
coreutils-8.30-12.0.1.el8.x86_64


Answers

  • user755585-Oracle
    user755585-Oracle Member Posts: 2 Employee

    This was resolved by upgrading docker to the latest version on OL7:

    $ rpm -qa |grep ^docker
    docker-cli-19.03.11.ol-13.el7.x86_64
    docker-compose-1.18.0-4.el7.noarch
    docker-engine-19.03.11.ol-13.el7.x86_64
    
    
    $ docker run --rm -it --entrypoint stat container-registry.oracle.com/os/oraclelinux:8 /home
      File: /home
      Size: 6               Blocks: 0          IO Block: 4096   directory
    Device: 28h/40d   Inode: 119787      Links: 2
    Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
    Access: 2021-11-24 20:04:53.286789781 +0000
    Modify: 2021-10-09 13:33:28.000000000 +0000
    Change: 2021-11-24 20:04:53.266789781 +0000
    Birth: -
    
    
    $ docker run --rm -it --entrypoint ls container-registry.oracle.com/os/oraclelinux:8 -l /etc
    total 932
    -rw-r--r--  1 root root   4536 Oct 13 12:13 DIR_COLORS
    -rw-r--r--  1 root root   5214 Oct 13 12:13 DIR_COLORS.256color
    -rw-r--r--  1 root root   4618 Oct 13 12:13 DIR_COLORS.lightbgcolor
    -rw-r--r--  1 root root     94 Mar 15  2019 GREP_COLORS
    drwxr-xr-x  3 root root     26 Nov 18 19:20 NetworkManager
    drwxr-xr-x  6 root root     70 Nov 18 19:20 X11
    -rw-r--r--  1 root root     12 Oct  9 08:54 adjtime
    -rw-r--r--  1 root root   1529 Jul 31  2020 aliases
    ...