I created /opt/chroot
, create bin
lib
and other directories in it, copied libraries, bash and perl binaries in proper places. Also I placed my script into /opt/chroot/bin/
.
Now I can run the script such a way:
# chroot /opt/chroot script.pl
There are two things that I am concerned about:
- Script gains root rights.
- There is a perl interpreter inside the chrooted environment.
How can I avoid these security holes?