I can chroot with Dir.chroot
Dir.chroot("/var/chroot/mychroot")
But how can I return back from chroot?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The point of a
chrootis that you can’t get out. However, if you don’tchdirto/var/chroot/mychroot, then you can still access the outside filesystem using., and..I don’t know much Ruby, but here’s the trick in Python: