Originally Posted by
linuxyogi
Hi,
https://help.ubuntu.com/community/BasicChroot
Is it somehow possible to configure chroot to allow (read only) access to a particular folder outside chroot ?
If that is possible I will install some useful but untrusted/unofficial PPAs inside the chroot environment. But if it is impossible to configure chroot to allow access to a folder outside there is no point.
Yes, you can mount any partition, directory or file, from outside the chroot environment the same way you mount dev, proc and sys.
Code:
sudo mount --bind /path/to/source /var/chroot/path/to/dest
If you want to make it read-only, you have to issue a second remount command:
Code:
sudo mount -o remount,ro /var/chroot/path/to/dest
Bookmarks