ルートディレクトリのlsにも疑問符が表示されます。

ルートディレクトリのlsにも疑問符が表示されます。

どのフォルダでもこれを実行すると、ls -alt次の結果が表示されます。ルートで作成したファイルやフォルダも同様です。stat filenamereturnのようなコマンドOperation not permitted。原因は何か知っていますか?

[root@011319292d9c ~]# pwd
/root
[root@011319292d9c ~]# ls -alt
ls: cannot access '.': Operation not permitted
ls: cannot access '..': Operation not permitted
ls: cannot access '.bash_profile': Operation not permitted
ls: cannot access '.tcshrc': Operation not permitted
ls: cannot access '.bashrc': Operation not permitted
ls: cannot access '.bash_logout': Operation not permitted
ls: cannot access 'test-file-i-created-as-root': Operation not permitted
total 0
d????????? ? ? ? ?            ? .
d????????? ? ? ? ?            ? ..
-????????? ? ? ? ?            ? .bash_logout
-????????? ? ? ? ?            ? .bash_profile
-????????? ? ? ? ?            ? .bashrc
-????????? ? ? ? ?            ? .cshrc
-????????? ? ? ? ?            ? .tcshrc
-????????? ? ? ? ?            ? test-file-i-created-as-root

PS これはドッカーコンテナの内部で発生します。デバッグ目的で、Redhat 8.5のdockerイメージでbashを使用して次のように起動しました。

docker run --rm -ti --entrypoint /bin/bash <Image-ID> 

次に始めて、実行中のコンテナを接続する際に問題がないことに注意することが重要です。docker run

docker exec -ti <Image-ID> /bin/bash

コンテナのホストオペレーティングシステム:

cat /etc/os-release 
NAME="Red Hat Enterprise Linux" 
VERSION="8.5 (Ootpa)" 
-------------
uname -a 
Linux 3985430895d8 3.10.0-514.26.2.el7.x86_64 #1 SMP Tue Jul 4 15:04:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

ドッカーファイル

FROM custom-docker-image:tag

RUN microdnf update

RUN install-custom-server-modules.sh

CMD ['start-script.sh']

(!)RUN microdnf updateDockerfileからその行を削除しても問題は発生しません。

ベストアンサー1

おすすめ記事