Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Can I use ProFTPd without using a chroot jail (thereby preventing access to anything outside of the FTP root)? I have a requirement to have symlinks in my FTP source that point to locations outside of the directory where I root my FTP service.

All of the docs and discussion I've read on ProFTPd talk about how to use the chroot functionality (even within StackExchange), but I'm wondering if I can bypass using that and use a different method to serve my FTP root. Since the symlinks must remain as symlinks, mounting the directories as a way of bypassing the chroot restriction (the clever "solution" to the problem) does not work.

share|improve this question
    
This link here : proftpd.org/docs/howto/Chroot.html will give you what you need, especially the "Filesystem tricks" section. –  schaiba Jan 25 '13 at 21:21
    
Again, I need to completely bypass the chroot functionality. –  palswim Jan 25 '13 at 21:36
    
That need is motivated solely by the symlinks issue or is there something else? If the symlinks are the only problem, the link I posted is valid. –  schaiba Jan 25 '13 at 22:00
    
The suggestions in the chroot documentation cause the filesystem to treat the mounts as actual directories. My filesystem contains symlinks that should remain as symlinks, so that solution does not suffice. –  palswim Jan 25 '13 at 22:25

1 Answer 1

The problem is that FTP was defined in the earliest prehistory of the Internet, and so has no provisons for security (passwords in plain text, ...). That is why FTP servers are usually used only for anonymous login, and as it is open to the Internet and has a rich command set (and a lot of very surprising functionality, this was created to transfer files between machines with really bizarre architectures, differing character representations, and strange operating systems). For sanity one runs such beasts clamped down.

Is it an option to use something like scp(1)? Use a webserver instead (should even be more efficient)?

Why do the symbolic links have to be symbolic links?

share|improve this answer
    
Other programs are accessing the filesystem in a way where they may want to ignore the symlinks. The FTP server should not ignore the symlinks. –  palswim Jan 25 '13 at 22:50
    
I know that Pure-FTPd can accomplish my requirements, but I was wondering about ProFTPd specifically. –  palswim Jan 25 '13 at 22:51
    
@palswim, are hard links out of the question? Place the files in the FTP area and link to them from outside? Keep copies inside? –  vonbrand Jan 25 '13 at 22:52
    
@vonbrand hard links may be unusable if one needs to have links to other file systems. –  Ruslan Sep 6 '13 at 6:46
    
@palswim you may use mount --bind as a workaround (will need to mount on every boot though) –  Ruslan Sep 6 '13 at 6:47

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.