So... you've just done a "chown -R foo:bar ./" and somehow bash-completion turned it into "chown -R foo:bar ../" when you hit enter. Or something. You have a backup that has all the owner/group/permissions correct. in the backup, do this: find -type f -print0 -or -type d -print0 | xargs -0 stat -c "chown %u:%g '%n'" > mass-chown now 'mass-chown' is a script to fix all the owners & groups. Caveat: if any filenames contain a single quote, you need to do those manually: grep "'.*'.*'" mass-chown to find them, then do the chowns, then remove those lines from mass-chown when that grep returns no hits on mass-chown, it should be safe to run it in the real directory. Then to compare, re-run that same find command pipeline, and the result file should match the mass-chown file from the backups. (note: you may need to apply 'sort' to both files before comparing.)