Bug 9879 - ls will list files even if it doesn't have permission
ls will list files even if it doesn't have permission
Product: Red Hat Linux
Classification: Retired
Component: fileutils (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bernhard Rosenkraenzer
: Security
Depends On:
  Show dependency treegraph
Reported: 2000-03-01 02:34 EST by Stephen Rasku
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-03-01 03:51:11 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Stephen Rasku 2000-03-01 02:34:17 EST
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.
Comment 1 Bernhard Rosenkraenzer 2000-03-01 03:51:59 EST
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
Comment 2 Stephen Rasku 2000-03-01 14:11:59 EST
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).

Note You need to log in before you can comment on or make changes to this bug.