Running ls on directory in local filesystem as root gets permission denied

Viewed 1017

The following happens on a local ext4 filesystem, no bind mounts, no selinux, when running as root (ssh root@localhost to be precise):

# cd /some/directory
# ls -ld chardet
drwxr-xr-x 2 root root 4096 Jul 29  2016 chardet
# ls chardet
ls: cannot open directory 'chardet': Permission denied

I entered single user mode, did a filesytem check, rebooted, same result. Then I booted the laptop using a (Ubuntu 16.04.3 server install) USB thumbdrive, opened the second virtual console and tried again, same result. fsck.ext4 again found no errors. There are no errors logged in the syslog.

Kernel is bog standard 4.11.0-041100-lowlatency from the linux kernel ppm, but as proved by the boot from thumbdrive, it happens with the standard ubuntu kernel as well.

lsattr won't detect anything strange, writing to /some/directory (actually it is /usr/lib/python2.7/dist-packages but that is probably unimportant) works, and any use of chmod or chattr on chardet gives the same error.

I am out of ideas now. Anyone else has an idea?

0 Answers
Related