↑ ↓ select, Enter open, Esc close

Find files without a valid owner

Adjust the values, the command updates live
root@server
find /var/www -xdev \( -nouser -o -nogroup \) -ls 2>/dev/null

Lists files whose UID or GID is no longer assigned to any user or group. In ls -l they show up with a number instead of a name. Typical after deleted Plesk subscriptions or after an rsync from another server with different UIDs.

Note: If a new user is later created with the same UID, these files automatically belong to that user, so clean them up or reassign them.

Also searched as

  • find files with nouser nogroup
  • orphaned files after deleting user
  • ls shows uid number instead of username
  • file owner does not exist

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.