Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Nov 2002 18:37:20 +0100 (CET)
From:      "Jose M. Alcaide" <jose@we.lc.ehu.es>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        jose@we.lc.ehu.es
Subject:   bin/45723: ls(1)'s wrong behaviour with not searchable directories
Message-ID:  <200211251737.gAPHbK1j004969@v-ger.we.lc.ehu.es>

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

>Number:         45723
>Category:       bin
>Synopsis:       ls(1)'s wrong behaviour with not searchable directories
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Nov 25 09:40:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Jose M. Alcaide
>Release:        FreeBSD 4.7-RELEASE i386
>Organization:
Universidad del Pais Vasco - Dept de Electricidad y Electronica
>Environment:
System: FreeBSD v-ger.we.lc.ehu.es 4.7-RELEASE FreeBSD 4.7-RELEASE #12: Thu Nov 21 18:56:49 CET 2002 root@v-ger.we.lc.ehu.es:/usr/obj/usr/src/sys/V-GER i386

>Description:
When a directory does not have search (x) permission, but it still have read
permission, its contents must be visible with "ls" (even "ls -i" should show
the inode numbers). However, FreeBSD's ls(1) does not show anything. Besides
that, a "ls -l" should fail, because search permission is required in order
to access the inode contents of the files in the directory; however, "ls -l"
gives nothing: no listing, no error message, nothing.

>How-To-Repeat:
$ mkdir FOOBAR
$ cd FOOBAR
$ touch a b c d e
$ cd ..
$ chmod -x FOOBAR
$ ls FOOBAR
  <no output, no errors>
$ ls -l FOOBAR
  <no output, no errors>

>Fix:
I tried to fix this problem, but ls(1) uses the fts(3) functions, and after
an hour or so trying to figure how it actually works, I only got a headache.
:-(
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




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