I'm trying to set up a directory where a user can traverse a directory but not prove the existence of anything in the directory. I have tried setting permissions such that the user has execute but not read permissions. Unfortunately the error returned (either "No such file or directory" or "Permission denied") will confirm whether a given item exists in the directory.
For example, here is what I currently see:
$ sudo ls -l permTest/ total 4 drwxr-x--- 2 root root 4096 Aug 10 12:35 exists $ ls -ld permTest drwxr-x--x 3 root root 4096 Aug 10 12:35 permTest/ $ ls permTest ls: cannot open directory 'permTest': Permission denied $ ls permTest/doesnotexist ls: cannot access 'permTest/doesnotexist': No such file or directory $ ls permTest/exists ls: cannot open directory 'permTest/exists': Permission denied
I would like the error messages in the final line to be identical.
I'm trying to set this up on MapRFS if that's relevant. It is broadly POSIX compliant.
I have read the answers at How does one create a directory that can't be seen and can only be accessed via its absolute path name?, but did not find a solution to my problem.