Hide Forgot
Description of problem: when ls -l on directory has permission denied on files the output is followed by some garbage lines. Version-Release number of selected component (if applicable): edplinux:mdl24:/tmp$ /bin/ls --version | head -1 ls (GNU coreutils) 8.22 edplinux:mdl24:/tmp$ rpm -q coreutils coreutils-8.22-15.el7_2.1.x86_64 How reproducible: Very Steps to Reproduce: edplinux:mdl24:/tmp$ mkdir test edplinux:mdl24:/tmp$ > test/a edplinux:mdl24:/tmp$ > test/b edplinux:mdl24:/tmp$ /bin/ls -dl test drwxrwxr-x. 2 mdl24 users 22 Apr 13 11:24 test edplinux:mdl24:/tmp$ /bin/ls -l test total 0 -rw-rw-r--. 1 mdl24 users 0 Apr 13 11:24 a -rw-rw-r--. 1 mdl24 users 0 Apr 13 11:24 b edplinux:mdl24:/tmp$ chmod 666 test edplinux:mdl24:/tmp$ /bin/ls -l test /bin/ls: cannot access test/a: Permission denied /bin/ls: cannot access test/b: Permission denied total 0 ?????????? ? ? ? ? ? a ?????????? ? ? ? ? ? b Actual results: Expected results: Additional info:
It is not garbage. Utility ls uses question mark in more places - one of them is situation when stat systemcall fails due to permissions. This behaviour is expected and it is not a bug in coreutils package and is documented in coreutils info documentation.