Red Hat Bugzilla – Bug 9879
ls will list files even if it doesn't have permission
Last modified: 2008-05-01 11:37:54 EDT
If a directory doesn't have execute permission it will still list its
contents, complaining about "Permission denied". On Solaris 7, it will not
list the contents of a directory without execute permission. This bug
allows a user to determine the files contained in directories that he has
no permission for.
Can't reproduce it here:
[bero@locutus bero] ls /root
ls: /root: Permission denied
The only filename I get is the directory I was trying to list, a name I've known
This will only occur if you have world read permissions but not world execute
permissions. This is consistent with Solaris. However, I am still curious why
you can display the filenames but not the file details (i.e. from ls -l).