crubb Posted April 6, 2013 Report Share Posted April 6, 2013 Hey,EDIT: Adapted for the "new" BitTorrent Sync.finally got my invitation. As I am not really comfortable running closed-source binaries on my linux box, please find a proof of concept for running btsync in a chroot with it's own user below.# useradd -m -s /bin/false btsync# cd /home/btsync/Download the latest *x64.gz and put it in /home/btsync# wget http://btsync.s3-website-us-east-1.amazonaws.com/btsync_x64.tar.gzSetup the chroot# tar xfvz btsync_x64.tar.gz# chmod u+x btsync# mkdir dev etc lib lib64 proc sync tmp# (cd dev; mknod random c 1 8; mknod urandom c 1 9)# (cd etc; cp /etc/ld.so.cache /etc/resolv.conf /etc/nsswitch.conf /etc/localtime .; grep btsync /etc/passwd > passwd; grep btsync /etc/group > group)# (cd lib; cp /lib/libpthread.so.0 /lib/libnsl.so.1 /lib/libdl.so.2 /lib/libnss_compat.so.2 /lib/libm.so.6 /lib/libc.so.6 /lib/librt.so.1 /lib/libnss_nis.so.2 /lib/libnss_files.so.2 .)# cp /lib64/ld-linux-x86-64.so.2 lib64/# mkdir -p usr/share/locale/# cp /usr/share/locale/locale.alias usr/share/locale/# mkdir -p usr/lib/locale/# cp /usr/lib/locale/locale-archive usr/lib/locale/# chown -R btsync:btsync /home/btsync# mount -o bind /proc /home/btsync/procAnd run btsync# chroot --userspec $(id -u btsync) /home/btsync ./btsync --config ./btsync.confHave fun! Quote Link to comment Share on other sites More sharing options...
kos13 Posted April 7, 2013 Report Share Posted April 7, 2013 Thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.