rewrite for chroot