0

I encountered a very strange situation with a bunch of directories:

user1$ ls -l example/
ls: cannot access 'example/a.txt': Permission denied
ls: cannot access 'example/b.txt': Permission denied
total 0
-????????? ? ? ? ?            ?  a.txt
-????????? ? ? ? ?            ?  b.txt

user1$ sudo ls -l example/ total 12345 drw-rwxr-x 2 user1 user1 4096 Jul 7 2018 ./ drwxrwxr-x 7 user1 user1 54321 Dec 14 12:15 ../ -rw-rw-r-- 1 user1 user1 2444333 Mar 17 2018 a.txt -rw-rw-r-- 1 user1 user1 1333222 Mar 17 2018 b.txt

With sudo, I can read the files successfully, change the permissions, etc. Without it, there is no way I can access those files. I tried to sudo chown user1:user1 the files, as well as sudo chmod a+r them: the commands succeed, but nothing changes.

What could possibly have happened to those files? How do I make it possible to access them?

0 Answers0