From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <98548176317808.tru64-unix-managers.marc@archive.invalid> From: "Paul R. Querelle" Date: Sun, 25 Mar 2001 00:56:04 +0000 To: tru64-unix-managers Subject: Proftpd V1.2.1, C2, V4.0E - User not Found Error ... X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=98548176317808 There seem to be a couple of problems with proftpd with C2 on V4.0E: 1. For non-anonymous FTP, a 'User not Found' error occurs. 2. A 'get_svc' error occurs when user's are chroot'ed to a directory other than '/'. The first problem can be solved by modifying the 'mod_unixpw.c' file as follows. It seems that under C2, the encrypted password must be truncated: MODRET pw_check(cmd_rec *cmd) { static char *pw,*cpw; cpw = cmd->argv[0]; pw = cmd->argv[2]; /* Add the following line to truncate the encrypted password */ cpw[13] = 0; if(strcmp(crypt(pw,cpw),cpw) != 0) { return ERROR(cmd); } return HANDLED(cmd); } The second problem is due to a DU feature/bug which stops 'ls' from working if '/etc/svc.conf' cannot be found. Obviously, this is pretty vital for an FTP server! The only solution, as per other posts is to put an empty '/etc/svc.conf' directory/file in the chroot'ed directory. Seems pretty lame to me, maybe someone else has a better solution? Finally, don't worry about the --sendfile problems with proftpd, V4.0E does not support this, so it's not compiled in by default anyway. I hope this is of help... Regards Paul. P.S. I got a couple of warnings re: 'size_t' type on compilation, but it seemed to work fine regardless. Maybe the proftpd guys can fix this?