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?
Asked
Active
Viewed 222 times
2 Answers
5
The only method I can think of is used of a bind mount. A quick google found http://docs.1h.com/Bind_mounts

becomingwisest
- 3,328
- 20
- 18
-
This is, pretty much the only way to do it, and it's how openvz does it. – Tom O'Connor Jan 18 '12 at 00:22
-
1Yes, indeed: `mount --bind /old /new` – yrk Jan 18 '12 at 00:37
5
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.

user842313
- 851
- 4
- 6