You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
-printf %m and -ls drop setuid/setgid/sticky bits and the file type #890
Two places format permissions differently from GNU find 4.9.0:
-printf %m masks the mode with 0o777 and pads it to three digits:
mode
GNU
uutils
4755
4755
755
1777 (e.g. /tmp)
1777
777
044
44
044
000
0
000
So find / -perm -4000 -printf '%m %p\n' hides the setuid bit it was searching for.
-ls has its own permission formatter that only knows directories and regular files and ignores the setuid, setgid and sticky bits:
file
GNU
uutils
/tmp
drwxrwxrwt
drwxrwxrwx
4755 file
-rwsr-xr-x
-rwxr-xr-x
symlink
lrwxrwxrwx
?rwxrwxrwx
/dev/null
crw-rw-rw-
?rw-rw-rw-
-printf %M already uses uucore::fs::display_permissions and matches GNU, so -ls could reuse it. I have small fixes for both and will open them as separate PRs.
Activity
sylvestre commentedon Nov 27, 2026
Fixed by #891 (-printf %m) and #892 (-ls)
Results with main 51ddbfe:
Same as GNU find 4.11.0.