While working with proftpd and chrooting users into their respective folders, how do I add a system link that they can access outside that folder while still maintaining the chroot ?
voth
Printable View
While working with proftpd and chrooting users into their respective folders, how do I add a system link that they can access outside that folder while still maintaining the chroot ?
voth
Now that's hard, since the chroot by definition doesn't let clients get outside. The only way is to use the mount --bind call.
Can you maybe supply me with a little more information on the command mount -bind you are refering to?
voth
They added the functionality pretty late, I think in kernel 2.4.18 or 19 or so. Check your kernel version before trying (run `uname -r' to find out your kernel version if you don't know it). mount --bind allows you to essentially hard-link directories, except it's not in the filesystem but only in the kernel. Use it like this:
That will make /var/dir available on /second/dir. Remember, since this doesn't change anything in the filesystem, you have to do it again every time you reboot.Code:mount --bind /var/dir /second/dir
See the mount manpage for more info.
How exactly do you chroot users using proftpd?
DefaultRoot ~