https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=206192
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: [email protected]
Reporter: [email protected]
The FreeBSD implementation of ls -R decides to omit directories from recursive
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 warnings.
To reproduce, in an empty directory do:
mkdir .a
chmod a-r .a
ls -R .
The following output results:
$ ls -R .
ls: ./.a: Permission denied
If .a was readable, ls -R would not list it either, so the error message seems
wrong.
[1]: http://austingroupbugs.net/view.php?id=1023
--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"