Featured Post

HOWTO: MySQL install guide for NAS4Free 10.2.x

Sep 27, 2010

Working around chroot jail to allow users to access other directories in my FTP server.

I was trying to use symbolic links:

ln -s /mnt/Personal/Music /mnt/user/Music

But I needed to add them to the wheel group - which didn't make sense, I tried doing everything relative, instead of absolute - like indicated http://www.proftpd.org/docs/howto/Chroot.html but it didn't work for me.  Adding them to wheel basically allowed them to navigate anywhere they wanted.

If anyone has had success using symlinks with their proftpd server, do let me know.

In the end I had to mount a null filesystem

mount_nullfs /mnt/Personal/Music /mnt/user/Music

This basically duplicates the filesystem, any changes made to the dupe will affect the original, so be very careful with your user privilages.

To undo this "link" you can simple umount the dupe

umount /mnt/user/Music

I do not currently know of any ill side effects to this, but I would appreciate any feedback from the guru's out there.

I do have to run these commands every-time the system starts - this is a real drawback - I would love to use symbolic links, but have not been able to work it out.

Learning FreeNAS: Configure and manage a network attached storage solution