Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Jan 2007 12:26:15 GMT
From:      Ricardo Branco<goabranco@hotmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   bin/107515: /bin/ls bug
Message-ID:  <200701041226.l04CQF72028955@www.freebsd.org>
Resent-Message-ID: <200701041230.l04CUB05015025@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         107515
>Category:       bin
>Synopsis:       /bin/ls bug
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jan 04 12:30:11 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Ricardo Branco
>Release:        6.2-PRERELEASE & 5.4-RELEASE
>Organization:
>Environment:
FreeBSD orion 6.2-PRERELEASE FreeBSD 6.2-PRERELEASE #0: Tue Jan  2 04:51:18 VET 2007     root@orion:/usr/obj/usr/src/sys/CUSTOM-3  i386
>Description:
Why is it that /bin/ls has the following behavior?

$ mkdir /tmp/a
$ chmod 000 /tmp/a
$ ls  /tmp/a/
ls: : Permission denied
$ ls /tmp/a
ls: a: Permission denied

I think the most sensible way is to use basename() and use the last component for the error message rather than just printing whatever exists after the last slash... 
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200701041226.l04CQF72028955>