Bug 9879

Summary: ls will list files even if it doesn't have permission
Product: [Retired] Red Hat Linux Reporter: Stephen Rasku <redhat>
Component: fileutilsAssignee: Bernhard Rosenkraenzer <bero>
Status: CLOSED WORKSFORME QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0Keywords: Security
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-03-01 08:51:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Stephen Rasku 2000-03-01 07:34:17 UTC
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 08:51:59 UTC
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
before.

Comment 2 Stephen Rasku 2000-03-01 19:11:59 UTC
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).