Hello, everyone,
I'm using Proftpd1.2.0pre3, and I've got the following problem: it works
like a charm with anonymous users, and with bourne-shell users. But I made
a special shell for the unprivileged users, with only 2 commands included.
For these users, I get the following error when they try to establish a
ftp connection:
hercules:~$ mc
hercules:~$ su
Password:
hercules:/home/staff/bgd# mc
hercules:/usr/local/proftpd-1.2.0pre3# ./configure
creating cache ./config.cache
checking host system type... i586-pc-linux-gnu
checking target system type... i586-pc-linux-gnu
checking build system type... i586-pc-linux-gnu
checking for gcc... gcc
checking whether the C compiler (gcc ) works... yes
checking whether the C compiler (gcc ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking whether make sets ${MAKE}... yes
checking for a BSD compatible install... /usr/bin/ginstall -c
checking for standalone crypt... yes
checking for standalone gethostbyname... yes
checking for standalone inet_aton... yes
checking for standalone nsl functions... yes
checking for standalone socket functions... yes
checking for _pw_stayopen variable... no
checking for dirent.h that defines DIR... yes
checking for opendir in -ldir... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for fcntl.h... yes
checking for sys/ioctl.h... yes
checking for sys/time.h... yes
checking for unistd.h... yes
checking for memory.h... yes
checking for shadow.h... yes
checking for ctype.h... yes
checking for getopt.h... yes
checking for crypt.h... no
checking for bstring.h... yes
checking for strings.h... yes
checking for sys/types.h... yes
checking for sys/param.h... yes
checking for sys/file.h... yes
checking for netdb.h... yes
checking for netinet/in.h... yes
checking for netinet/tcp.h... yes
checking for arpa/inet.h... yes
checking for sys/stat.h... yes
checking for errno.h... yes
checking for sys/socket.h... yes
checking for sys/termios.h... yes
checking for sys/termio.h... yes
checking for sys/statvfs.h... no
checking for sys/vfs.h... yes
checking for sys/select.h... no
checking for regex.h... yes
checking for glob.h... yes
checking for fnmatch.h... yes
checking for syslog.h... yes
checking for working const... yes
checking for uid_t in sys/types.h... yes
checking for pid_t... yes
checking for size_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for umode_t... yes
checking for ino_t... yes
checking for utmp.h... yes
checking whether your struct utmp has ut_user... yes
checking whether your struct utmp has ut_host... yes
checking whether your glob.h defines GLOB_PERIOD... yes
checking whether your glob.h defines GLOB_ALTDIRFUNC... no
checking for timer_t... no
checking whether your syslog.h defines LOG_CRON... yes
checking whether your syslog.h defines LOG_FTP... no
checking whether your fnmatch.h defines FNM_NOESCAPE... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for working fnmatch... yes
checking whether gcc needs -traditional... no
checking whether setpgrp takes no argument... yes
checking return type of signal handlers... void
checking for vprintf... yes
checking for getcwd... yes
checking for gethostname... yes
checking for gettimeofday... yes
checking for mkdir... yes
checking for rmdir... yes
checking for select... yes
checking for socket... yes
checking for strerror... yes
checking for strtol... yes
checking for strchr... yes
checking for memcpy... yes
checking for bcopy... yes
checking for flock... yes
checking for getopt... yes
checking for getopt_long... yes
checking for strsep... yes
checking for vsnprintf... yes
checking for __vsnprintf... no
checking for snprintf... yes
checking for __snprintf... no
checking for setsid... yes
checking for setpassent... no
checking for seteuid... yes
checking for setegid... yes
checking for crypt... yes
checking for fgetpwent... yes
checking for fgetgrent... yes
checking for inet_aton... yes
checking for siginterrupt... yes
checking for setpgid... yes
checking for regcomp... yes
checking for setproctitle... no
checking for libutil.h... no
checking for setproctitle in -lutil... no
checking for sys/pstat.h... no
checking whether __progname and __progname_full are available... no
checking which argv replacement method to use... writeable
updating cache ./config.cache
creating ./config.status
creating lib/Makefile
creating src/Makefile
creating modules/Makefile
creating Makefile
creating Make.rules
creating Make.modules
creating config.h
hercules:/usr/local/proftpd-1.2.0pre3# make
cd lib ; make lib
make[1]: Entering directory `/usr/local/proftpd-1.2.0pre3/lib'
gcc -g -O2 -DUSESHADOW -DCONFIG_FILE_PATH=\"/usr/local/etc/proftpd.conf\"
-DRUN_DIR=\"/usr/local/var/proftpd\" -DLINUX -I.. -I../include -c
getopt.c
gcc -g -O2 -DUSESHADOW -DCONFIG_FILE_PATH=\"/usr/local/etc/proftpd.conf\"
-DRUN_DIR=\"/usr/local/var/proftpd\" -DLINUX -I.. -I../include -c
getopt1.c
gcc -g -O2 -DUSESHADOW -DCONFIG_FILE_PATH=\"/usr/local/etc/proftpd.conf\"
-DRUN_DIR=\"/usr/local/var/proftpd\" -DLINUX -I.. -I../include -c
fnmatch.c
gcc -g -O2 -DUSESHADOW -DCONFIG_FILE_PATH=\"/usr/local/etc/proftpd.conf\"
-DRUN_DIR=\"/usr/local/var/proftpd\" -DLINUX -I.. -I../include -c
strsep.c
gcc -g -O2 -DUSESHADOW -DCONFIG_FILE_PATH=\"/usr/local/etc/proftpd.conf\"
-DRUN_DIR=\"/usr/local/var/proftpd\" -DLINUX -I.. -I../include -c
vsnprintf.c
gcc -g -O2 -DUSESHADOW -DCONFIG_FILE_PATH=\"/usr/local/etc/proftpd.conf\"
-DRUN_DIR=\"/usr/local/var/proftpd\" -DLINUX -I.. -I../include -c glob.c
gcc -g -O2 -DUSESHADOW -DCONFIG_FILE_PATH=\"/usr/local/etc/proftpd.conf\"
-DRUN_DIR=\"/usr/local/var/proftpd\" -DLINUX -I.. -I../include -c
pwgrent.c
ar rc libsupp.a getopt.o getopt1.o fnmatch.o strsep.o vsnprintf.o glob.o
pwgrent.o
make[1]: Leaving directory `/usr/local/proftpd-1.2.0pre3/lib'
cd src ; make src
make[1]: Entering directory `/usr/local/proftpd-1.2.0pre3/src'
gcc -g -O2 -DUSESHADOW -DCONFIG_FILE_PATH=\"/usr/local/etc/proftpd.conf\"
-DRUN_DIR=\"/usr/local/var/proftpd\" -DLINUX -I.. -I../include -c main.c
gcc -g -O2 -DUSESHADOW -DCONFIG_FILE_PATH=\"/usr/local/etc/proftpd.conf\"
-DRUN_DIR=\"/usr/local/var/proftpd\" -DLINUX -I.. -I../include -c
timers.c
gcc -g -O2 -DUSESHADOW -DCONFIG_FILE_PATH=\"/usr/local/etc/proftpd.conf\"
-DRUN_DIR=\"/usr/local/var/proftpd\" -DLINUX -I.. -I../include -c sets.c
gcc -g -O2 -DUSESHADOW -DCONFIG_FILE_PATH=\"/usr/local/etc/proftpd.conf\"
-DRUN_DIR=\"/usr/local/var/proftpd\" -DLINUX -I.. -I../include -c pool.c
gcc -g -O2 -DUSESHADOW -DCONFIG_FILE_PATH=\"/usr/local/etc/proftpd.conf\"
-DRUN_DIR=\"/usr/local/var/proftpd\" -DLINUX -I.. -I../include -c
dirtree.c
gcc -g -O2 -DUSESHADOW -DCONFIG_FILE_PATH=\"/usr/local/etc/proftpd.conf\"
-DRUN_DIR=\"/usr/local/var/proftpd\" -DLINUX -I.. -I../include -c
support.c
gcc -g -O2 -DUSESHADOW -DCONFIG_FILE_PATH=\"/usr/local/etc/proftpd.conf\"
-DRUN_DIR=\"/usr/local/var/proftpd\" -DLINUX -I.. -I../include -c inet.c
gcc -g -O2 -DUSESHADOW -DCONFIG_FILE_PATH=\"/usr/local/etc/proftpd.conf\"
-DRUN_DIR=\"/usr/local/var/proftpd\" -DLINUX -I.. -I../include -c log.c
gcc -g -O2 -DUSESHADOW -DCONFIG_FILE_PATH=\"/usr/local/etc/proftpd.conf\"
-DRUN_DIR=\"/usr/local/var/proftpd\" -DLINUX -I.. -I../include -c io.c
gcc -g -O2 -DUSESHADOW -DCONFIG_FILE_PATH=\"/usr/local/etc/proftpd.conf\"
-DRUN_DIR=\"/usr/local/var/proftpd\" -DLINUX -I.. -I../include -c ident.c
gcc -g -O2 -DUSESHADOW -DCONFIG_FILE_PATH=\"/usr/local/etc/proftpd.conf\"
-DRUN_DIR=\"/usr/local/var/proftpd\" -DLINUX -I.. -I../include -c data.c
gcc -g -O2 -DUSESHADOW -DCONFIG_FILE_PATH=\"/usr/local/etc/proftpd.conf\"
-DRUN_DIR=\"/usr/local/var/proftpd\" -DLINUX -I.. -I../include -c
modules.c
gcc -g -O2 -DUSESHADOW -DCONFIG_FILE_PATH=\"/usr/local/etc/proftpd.conf\"
-DRUN_DIR=\"/usr/local/var/proftpd\" -DLINUX -I.. -I../include -c auth.c
auth.c: In function `auth_getpwuid':
auth.c:194: warning: cast to pointer from integer of different size
auth.c: In function `auth_getgrgid':
auth.c:234: warning: cast to pointer from integer of different size
auth.c: In function `auth_uid_name':
auth.c:297: warning: cast to pointer from integer of different size
auth.c: In function `auth_gid_name':
auth.c:321: warning: cast to pointer from integer of different size
auth.c: In function `auth_name_uid':
auth.c:348: warning: cast from pointer to integer of different size
auth.c: In function `auth_name_gid':
auth.c:368: warning: cast from pointer to integer of different size
gcc -g -O2 -DUSESHADOW -DCONFIG_FILE_PATH=\"/usr/local/etc/proftpd.conf\"
-DRUN_DIR=\"/usr/local/var/proftpd\" -DLINUX -I.. -I../include -c fs.c
gcc -g -O2 -DUSESHADOW -DCONFIG_FILE_PATH=\"/usr/local/etc/proftpd.conf\"
-DRUN_DIR=\"/usr/local/var/proftpd\" -DLINUX -I.. -I../include -c
ftpcount.c
gcc -g -O2 -DUSESHADOW -DCONFIG_FILE_PATH=\"/usr/local/etc/proftpd.conf\"
-DRUN_DIR=\"/usr/local/var/proftpd\" -DLINUX -I.. -I../include -c utils.c
gcc -g -O2 -DUSESHADOW -DCONFIG_FILE_PATH=\"/usr/local/etc/proftpd.conf\"
-DRUN_DIR=\"/usr/local/var/proftpd\" -DLINUX -I.. -I../include -c
ftpshut.c
make[1]: Leaving directory `/usr/local/proftpd-1.2.0pre3/src'
cd modules; make modules
make[1]: Entering directory `/usr/local/proftpd-1.2.0pre3/modules'
gcc -g -O2 -DUSESHADOW -DCONFIG_FILE_PATH=\"/usr/local/etc/proftpd.conf\"
-DRUN_DIR=\"/usr/local/var/proftpd\" -DLINUX -I.. -I../include -c
mod_core.c
gcc -g -O2 -DUSESHADOW -DCONFIG_FILE_PATH=\"/usr/local/etc/proftpd.conf\"
-DRUN_DIR=\"/usr/local/var/proftpd\" -DLINUX -I.. -I../include -c
mod_auth.c
gcc -g -O2 -DUSESHADOW -DCONFIG_FILE_PATH=\"/usr/local/etc/proftpd.conf\"
-DRUN_DIR=\"/usr/local/var/proftpd\" -DLINUX -I.. -I../include -c
mod_xfer.c
gcc -g -O2 -DUSESHADOW -DCONFIG_FILE_PATH=\"/usr/local/etc/proftpd.conf\"
-DRUN_DIR=\"/usr/local/var/proftpd\" -DLINUX -I.. -I../include -c
mod_site.c
gcc -g -O2 -DUSESHADOW -DCONFIG_FILE_PATH=\"/usr/local/etc/proftpd.conf\"
-DRUN_DIR=\"/usr/local/var/proftpd\" -DLINUX -I.. -I../include -c
mod_ls.c
gcc -g -O2 -DUSESHADOW -DCONFIG_FILE_PATH=\"/usr/local/etc/proftpd.conf\"
-DRUN_DIR=\"/usr/local/var/proftpd\" -DLINUX -I.. -I../include -c
mod_unixpw.c
mod_unixpw.c: In function `pw_getpwuid':
mod_unixpw.c:298: warning: cast from pointer to integer of different size
mod_unixpw.c: In function `pw_getgrgid':
mod_unixpw.c:349: warning: cast from pointer to integer of different size
mod_unixpw.c: In function `pw_uid_name':
mod_unixpw.c:530: warning: cast from pointer to integer of different size
mod_unixpw.c: In function `pw_gid_name':
mod_unixpw.c:560: warning: cast from pointer to integer of different size
mod_unixpw.c: In function `pw_name_uid':
mod_unixpw.c:596: warning: cast to pointer from integer of different size
mod_unixpw.c: In function `pw_name_gid':
mod_unixpw.c:614: warning: cast to pointer from integer of different size
gcc -g -O2 -DUSESHADOW -DCONFIG_FILE_PATH=\"/usr/local/etc/proftpd.conf\"
-DRUN_DIR=\"/usr/local/var/proftpd\" -DLINUX -I.. -I../include -c
mod_log.c
srcdir=. ./glue.sh mod_core.o mod_auth.o mod_xfer.o mod_site.o mod_ls.o
mod_unixpw.o mod_log.o
gcc -g -O2 -DUSESHADOW -DCONFIG_FILE_PATH=\"/usr/local/etc/proftpd.conf\"
-DRUN_DIR=\"/usr/local/var/proftpd\" -DLINUX -I.. -I../include -c
module_glue.c
make[1]: Leaving directory `/usr/local/proftpd-1.2.0pre3/modules'
gcc -Llib -o proftpd src/main.o src/timers.o src/sets.o src/pool.o
src/dirtree.o src/support.o src/inet.o src/log.o src/io.o src/ident.o
src/data.o src/modules.o src/auth.o src/fs.o modules/mod_core.o
modules/mod_auth.o modules/mod_xfer.o modules/mod_site.o modules/mod_ls.o
modules/mod_unixpw.o modules/mod_log.o modules/module_glue.o -lsupp
gcc -Llib -o ftpcount src/ftpcount.o src/pool.o src/log.o src/utils.o
-lsupp
gcc -Llib -o ftpshut src/ftpshut.o -lsupp
hercules:/usr/local/proftpd-1.2.0pre3# make install
cd lib ; make lib
make[1]: Entering directory `/usr/local/proftpd-1.2.0pre3/lib'
make[1]: Nothing to be done for `lib'.
make[1]: Leaving directory `/usr/local/proftpd-1.2.0pre3/lib'
cd src ; make src
make[1]: Entering directory `/usr/local/proftpd-1.2.0pre3/src'
make[1]: Nothing to be done for `src'.
make[1]: Leaving directory `/usr/local/proftpd-1.2.0pre3/src'
cd modules; make modules
make[1]: Entering directory `/usr/local/proftpd-1.2.0pre3/modules'
make[1]: Nothing to be done for `modules'.
make[1]: Leaving directory `/usr/local/proftpd-1.2.0pre3/modules'
gcc -Llib -o proftpd src/main.o src/timers.o src/sets.o src/pool.o
src/dirtree.o src/support.o src/inet.o src/log.o src/io.o src/ident.o
src/data.o src/modules.o src/auth.o src/fs.o modules/mod_core.o
modules/mod_auth.o modules/mod_xfer.o modules/mod_site.o modules/mod_ls.o
modules/mod_unixpw.o modules/mod_log.o modules/module_glue.o -lsupp
/usr/bin/ginstall -c -s -o root -g root -m 0755 proftpd
/usr/local/sbin/proftpd
if [ ! -f /usr/local/sbin/in.proftpd ] ; then \
(cd /usr/local/sbin ; rm -f in.proftpd ; ln -s proftpd in.proftpd) ; \
fi
/usr/bin/ginstall -c -s -o root -g root -m 0755 ftpcount
/usr/local/bin/ftpcount
(cd /usr/local/bin ; rm -f ftpwho ; ln -s ftpcount ftpwho)
/usr/bin/ginstall -c -s -o root -g root -m 0755 ftpshut
/usr/local/sbin/ftpshut
if [ ! -f /usr/local/etc/proftpd.conf ] ; then \
/usr/bin/ginstall -c -o root -g root -m 0644 \
./sample-configurations/basic.conf \
/usr/local/etc/proftpd.conf ; \
fi
/usr/bin/ginstall -c -o root -g root -m 0644 ./src/proftpd.8
/usr/local/man/man8
/usr/bin/ginstall -c -o root -g root -m 0644 ./src/ftpshut.8
/usr/local/man/man8
/usr/bin/ginstall -c -o root -g root -m 0644 ./src/ftpwho.1
/usr/local/man/man1
/usr/bin/ginstall -c -o root -g root -m 0644 ./src/ftpcount.1
/usr/local/man/man1
/usr/bin/ginstall -c -o root -g root -m 0644 ./src/xferlog.5
/usr/local/man/man5
hercules:/home/staff/bgd# tail -f /syslog/
access_log lastlog mount syslog
archive lock news utmp
cron log.mesg packages wtmp
debug log.nmb removed_packages xferlog
disk_contents log.smb removed_scripts
error_log log.sys scripts
httpd_log messages setup
hercules:/home/staff/bgd# tail -f /syslog/messages
Sep 27 10:09:11 hercules sendmail[11487]: KAA11485: to=<[EMAIL PROTECTED]>,
delay=00:01:12, xdelay=00:01:10, mailer=esmtp,
relay=mxpool01.netaddress.usa.net. [204.68.24.19], stat=Sent (Mail
accepted (698DiAieC0025M09))
Sep 27 10:11:50 hercules identd[11588]: Connection from localhost
Sep 27 10:11:50 hercules identd[11588]: from: 127.0.0.1 ( localhost ) for:
3822, 21
Sep 27 10:11:54 hercules proftpd[11586]: FTP session closed.
Sep 27 10:13:15 hercules su[11601]: + ttyp0 bgd-root
Sep 27 10:23:04 hercules sendmail[13728]: KAA13728:
from=<[EMAIL PROTECTED]>, size=2462, class=-60,
pri=140462, nrcpts=1, msgid=<99092708142206.01240@pa3gcu>, proto=SMTP,
relay=lmtp07.iname.net [165.251.8.71]
Sep 27 10:23:07 hercules sendmail[13730]: KAA13728: to=<[EMAIL PROTECTED]>,
delay=00:00:12, xdelay=00:00:03, mailer=local, stat=Sent
Sep 27 10:25:51 hercules identd[13860]: Connection from localhost
Sep 27 10:25:51 hercules identd[13860]: from: 127.0.0.1 ( localhost ) for:
3927, 21
Sep 27 10:25:56 hercules proftpd[13858]: failed login 'zvancea' from
localhost [127.0.0.1] to 127.0.0.1:21 (invalid shell)
Sep 27 10:26:15 hercules proftpd[13858]: FTP session closed.
hercules:/home/staff/bgd# mf
bash: mf: command not found
chercules:/home/staff/bgd# mc
hercules:/home/staff/bgd#
hercules:/home/staff/bgd# cd
hercules:~# killall -HUP inetd
hercules:~# ps ax | grep inetd
53 ? S 0:00 /usr/sbin/inetd
13870 p0 S 0:00 grep inetd
hercules:~# tail -f /syslog/messages
Sep 27 10:13:15 hercules su[11601]: + ttyp0 bgd-root
Sep 27 10:23:04 hercules sendmail[13728]: KAA13728:
from=<[EMAIL PROTECTED]>, size=2462, class=-60,
pri=140462, nrcpts=1, msgid=<9909 PINE 4.05 COMPOSE MESSAGE
Folder: INBOX 4 Messages
To : [EMAIL PROTECTED]
Cc :
Attchmnt:
Subject : Proftpd configuration
----- Message Text -----
Hello, everyone,
I'm using Proftpd1.2.0pre3, and I've got the following problem: it works
like a charm with anonymous users, and with bourne-shell users. But I made
a special shell for the unprivileged users, with only 2 commands included.
For these users, I get the following error when they try to establish a
ftp connection:
failed login 'user_name' from localhost [127.0.0.1] to 127.0.0.1:21
(invalid shell)
If I change their shell into bourne shell, everything works normal... What
am I missing??? What's the connection between the shell and ftp? Am I
missing something in building the shell, or in configuring the ftp server?
Thanks & Have fun,
bogdan