* Prof J C Nash <nashjc [ at ] uottawa [ dot ] ca> [061019 20:28]: > In order to run some older software, I set up a debootstrap VM on one of > my servers. Works fine, but... > Now I want to be able to load files into a home directory public_html > area on the VM. However, sftp wants to put this in the home dir of the > "real" user in the real machine. The best way to share files between outside and inside of a chroot is using bind and rbind mounts. A bind mount is like any other mount in UNIX except that the filesystem being mounted is an existing directory. From outside the chroot: # mount -o bind /home /VM/home now the two directories are "bound" together. They have the same inode number and hold the same files. The other one I mentioned is "rbind". This only differs from "bind" if there are directories bound under /home. If you use "bind" it will not show the other mounts under /home in the target of the mount. # mount -o rbind /home /VM/home ... this will however cause all mounts under /home to be visible in /VM/home. Did I understand the problem correctly? I think this is only available in 2.6 kernels... but I cannot verify it not working in 2.4 as I don't run those anymore. -Bart -- WebSig: http://www.jukie.net/~bart/sig/
Attachment:
signature.asc
Description: Digital signature