FreeBSD Proftpd with chroot on (default root ~) does not allow for the creation of, or uploading to folders named 'lib' Upstream To test if this is an upstream problem with proftpd I have installed proftpd-basic_1.3.4a-5+deb7u2_armhf.deb onto a raspberry pi to test but can create and upload to 'lib' folders there. Additional As many wordpress plugins use such folders, this is quite problematic.
Fix Summary and assign.
There is a special case in src/fsio.c, mentioning https://auscert.org.au/15286 https://auscert.org.au/15526 which basically says: We do not allow uploads to /etc and /lib if chrooted. Those are old CERT alerts, so someone needs to check if proftpd on FreeBSD is still vulnerable to that attack vector.
Not a fix, but as a workaround you can give users a login to a folder above, which makes it /parent/lib instead of /lib.
It is sad, because we have hundereds of domains (FTP users) on our servers using ProFTPd, so we can not change directory layout and some of our clients are using ~/lib/ for libraries of PHP webapplications for many years - and now are inaccessible.
Is this still relevant?
(In reply to w.schwarzenfeld from comment #5) Yes, it is still relevant for proftpd-1.3.6 "lib" cennot be created (or accessed): Status: Creating directory '/lib'... Command: MKD lib Response: 550 lib: Permission denied Command: MKD /lib Response: 550 /lib: Permission denied "lib2" was successfully created: Status: Creating directory '/lib2'... Status: Retrieving directory listing of "/lib2"... Status: Directory listing of "/lib2" successful
Did you consider using ftp/proftpd-mod_vroot? http://www.castaglia.org/proftpd/modules/mod_vroot.html
(In reply to Martin Matuska from comment #7) No. And from the manpage I don't know how it should be configured to use current directory layout but allow us to use "lib" directory as it was possible back in the days. ProFTPd is causing me more and more headaches (segfaulting regularly after midnight logrotation) that I am more and more heading to switch to another FTP daemon with similar functionalities.