If I got it right, chroot restricts user's access to a given directory only. Looks like
useradd has this option (Debian 10).
# useradd --help | grep "chroot" -R, --root CHROOT_DIR directory to chroot into
Looks simple, yet nobody seems to be recommending it:
- Create an user in linux that can access only a specific folder
Why? Is it not portable or secure/reliable enough?