Skip to content

find: -perm u=rwX matches 0600 directories instead of 0700 #930

Closed

Description

@zhangpan2001

-perm u=rwX matches a directory with mode 0600 instead of one with mode 0700.

From the repository root after building:

uu_find="$PWD/target/debug/find"
tmp=$(mktemp -d)
(
    cd "$tmp" || exit
    mkdir d600 d700
    chmod 600 d600
    chmod 700 d700
    LC_ALL=C /usr/bin/find d600 d700 -maxdepth 0 -perm u=rwX -print
    LC_ALL=C "$uu_find" d600 d700 -maxdepth 0 -perm u=rwX -print
)

Expected: d700
Actual: d600

GNU prints d700; uutils prints d600. Both exit 0 with empty stderr.

Tested with uutils findutils 0.11.0, main 82cfc21f0d45fc654588f0f4243e9c6e5f57fc97, on Debian forky/sid, Linux x86_64, against /usr/bin/find from GNU findutils 4.11.0.

Activity

  1. zhangpan2001 commented on Oct 28, 2026

    @zhangpan2001
    ContributorAuthor

    I have a fix locally and can open a PR.

  2. added a commit that references this issue on Oct 29, 2026
    812e1a2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions