DOKK / manpages / debian 12 / lxd-tools / fuidshift.1.en
FUIDSHIFT(1) User Commands FUIDSHIFT(1)

fuidshift - uid/gid shifter

UID/GID shifter
This tool lets you remap a filesystem tree, switching it from one set of UID/GID ranges to another.
This is mostly useful when retrieving a wrongly shifted filesystem tree from a backup or broken system and having to remap everything either to the host UID/GID range (uid/gid 0 is root) or to an existing container's range.
A range is represented as <u|b|g>:<first_container_id>:<first_host_id>:<size>. Where "u" means shift uid, "g" means shift gid and "b" means shift uid and gid.

fuidshift <directory> <range> [<range>...] [flags]

fuidshift my-dir/ b:0:100000:65536 u:10000:1000:1

Print help
Perform a reverse mapping
Test mode (no change to files)
Print version number
May 2023 fuidshift 5.0.2