Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

What does

mount -t proc none /proc

do inside the chrooted environment?

After doing that, when I run htop or ps aux inside the chrooted environment, I can see the actual root's processes.

Does it mean mount -t proc none /proc makes the chroot more insecure?

Thank you!

share|improve this question

1 Answer 1

up vote 1 down vote accepted

To start off a chroot does not make your system more secure. There are known methods to break out of a chroot that nobody intends to fix because chroot is not a security mechanism (ref). So your question doesn't really make much sense.

In any case. Try doing an ls -al /proc/1/cwd/

share|improve this answer
    
This is what I got (on the actual root): lrwxrwxrwx 1 root admin 0 Feb 23 19:04 /proc/1/cwd -> / so what does this mean? –  user269334 Feb 23 '12 at 19:04
    
Sorry, forgot the trailing slash, in the command. Try doing a cd /proc/1/cwd/ instead or in addition to the ls. –  Zoredache Feb 23 '12 at 19:07
    
@Zoredache, hmm, I don't think there's an issue with cwd. It seems it's only a symlink so in chroot it will list chroot's /. But there are more interesting stuff like /proc/<pid>/fd/ (and so on), which will make going out of chroot much easier. –  rvs Feb 23 '12 at 19:23
    
If you look closely, you will notice that you actually see the root filesystem. Or at least I see the rootfs in my a chroot On both Debian/Ubuntu systems of various vintages. –  Zoredache Feb 23 '12 at 19:26

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.