Created
November 11, 2020 04:53
-
-
Save moycat/76f2c6a54e38e29ca75789e73efafee0 to your computer and use it in GitHub Desktop.
UnionFS Sandbox
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# run as root | |
# create | |
mkdir -p /tmp/union/root /tmp/union/tmp | |
unionfs-fuse -o cow,dev,suid,allow_other /tmp/union/tmp=RW:/=RO /tmp/union/root | |
mount --bind /dev /tmp/union/root/dev | |
mount --bind /sys /tmp/union/root/sys | |
mount --bind /proc /tmp/union/root/proc | |
# enter | |
chroot /tmp/union/root | |
# destroy | |
umount /tmp/union/root/dev /tmp/union/root/sys /tmp/union/root/proc | |
umount /tmp/union/root | |
rm -rf /tmp/union |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment