max-mapper / HyperOS

A 50MB linux distribution that has dat-container for booting live containers on mac OS
120 stars 12 forks source link

run chroot as non-root #4

Open max-mapper opened 8 years ago

max-mapper commented 8 years ago

some chroot implementations have a --userspec arg to specify the user the chroot should run as. but it doesn't look like the busybox chroot does:

chroot: can't execute '--userspec=admin:admin': No such file or directory

perhaps we can create an admin user, give it chroot privs, then run chroot as that user. or maybe we can chroot as root then immediately drop privileges somehow