Skip to content

Instantly share code, notes, and snippets.

@herbhuang
Last active January 24, 2023 03:25
Show Gist options
  • Select an option

  • Save herbhuang/ea5c057953768b8f7700fc8e132da9ce to your computer and use it in GitHub Desktop.

Select an option

Save herbhuang/ea5c057953768b8f7700fc8e132da9ce to your computer and use it in GitHub Desktop.
setup-PVE-mount
chown -R 1005:1005 /mnt/pve/dat/Download/
# uid map: from uid 0 map 1005 uids (in the ct) to the range starting 100000 (on the host), so 0..1004 (ct) → 100000..101004 (host)
lxc.idmap = u 0 100000 1005
lxc.idmap = g 0 100000 1005
# we map 1 uid starting from uid 1005 onto 1005, so 1005 → 1005
lxc.idmap = u 1005 1005 1
lxc.idmap = g 1005 1005 1
# we map the rest of 65535 from 1006 upto 101006, so 1006..65535 → 101006..165535
lxc.idmap = u 1006 101006 64530
lxc.idmap = g 1006 101006 64530
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment