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.

I have created a chroot jail, but now I want to be able to create a link within the jail which links outside of the jail. Is this possible?

share|improve this question
add comment

2 Answers 2

up vote 5 down vote accepted

The only method I can think of is used of a bind mount. A quick google found http://docs.1h.com/Bind_mounts

share|improve this answer
    
This is, pretty much the only way to do it, and it's how openvz does it. –  Tom O'Connor Jan 18 '12 at 0:22
1  
Yes, indeed: mount --bind /old /new –  yarek Jan 18 '12 at 0:37
    
Thanks, worked perfectly. –  samwell Jan 18 '12 at 22:21
add comment

Yes, as Christopher said, a bind mount will work. But I think it will work only with directories and not at file level.

If you need file links you can use hard links but it will only work within a Linux ext filesystem (don't know if other fs support it)

See Here for a description of the difference between hard and soft links.

share|improve this answer
add comment

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.