Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Jan 2016 11:03:04 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 206192] ls -R warns about EACCES on directories it's not going to list anyway
Message-ID:  <bug-206192-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D206192

            Bug ID: 206192
           Summary: ls -R warns about EACCES on directories it's not going
                    to list anyway
           Product: Base System
           Version: 10.2-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: bin
          Assignee: freebsd-bugs@FreeBSD.org
          Reporter: fuz@fuz.su

The FreeBSD implementation of ls -R decides to omit directories from recurs=
ive
listing which are omitted from listing anyway. This may be in violation of
POSIX [1] but that's irrelevant for this bug report. When ls -R encounters a
directory without reading permission, it outputs the resulting EACCES. This
even happens for directories which are never listed by ls -R anyway due to
their names beginning with a dot, which causes ls to output spurious warnin=
gs.
To reproduce, in an empty directory do:

    mkdir .a
    chmod a-r .a
    ls -R .

The following output results:

    $ ls -R .=20
    ls: ./.a: Permission denied

If .a was readable, ls -R would not list it either, so the error message se=
ems
wrong.

[1]: http://austingroupbugs.net/view.php?id=3D1023

--=20
You are receiving this mail because:
You are the assignee for the bug.=



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