chmod: recursive mode returns exit code 0 even when some files fail (last-file-wins)
In Chmoder::chmod() the recursive branch overwrites the running result instead of accumulating it, so the exit code reflects only the last file processed: if self.recursive { r = self.walk_dir_with_context(file, true); // overwrites r } else { r = self.chmod_file(file).and(r); } PoC: GNU returns 1 when a file fails; uutils returns 0 if the last entry succeeds: $ chmod -R 0755 chmod-bug/root chmod-bug/user # GNU -> ret=1 $ uutils chmod -R …