PDA

View Full Version : Question about Virtual Hosting With Proftpd And MySQL (Incl. Quota) On Debian Etch


ikkem
21st February 2008, 01:32
I followed the instructions from this how to http://www.howtoforge.com/proftpd_mysql_virtual_hosting_debian_etch

When I try to login to proftpd I get this error message....

Status: Connecting to myipadress:21...
Error: Could not connect to server

Status: Connecting to 127.0.0.1:21...
Status: Connection established, waiting for welcome message...
Response: 220 My FTPD
Command: USER ikkem
Response: 331 Password required for ikkem.
Command: PASS ********
Response: 530 Login incorrect.
Error: Could not connect to server

Could someone please help me to solve this problem i have been at it for almost a week now.
Thanks in advance...

topdog
21st February 2008, 08:21
The first problem could be a firewall blocking access or your ftp server binding only to localhost.

As for the second one, are there any errors in the logs ?

ikkem
21st February 2008, 10:21
@topdog thanks for reacting

I use shorewall behind a speedtouch router could you point me into the right direction in how to make contact with the net through the right routes.
A noob question where should i look for the log files also which comands should i give to check proftpd...
I tried to connect to proftpd through a other computer in the lan area but I could not connect also....

thanks in advance

ikkem

topdog
21st February 2008, 10:30
You need to allow ftp on shorewall then port forward ftp from the speedtouch router.

The problem is an authentication on so check, /var/log/syslog and also the proftpd server logs

ikkem
21st February 2008, 11:23
hi these are the rules in my /etc/shorewall/rules

FTP/ACCEPT net loc tcp

ACCEPT net fw tcp 20
ACCEPT net fw tcp 21
ACCEPT net fw tcp 2900

/var/log/syslog info

Shorewall:logflags:DROP:IN=eth0 OUT= MAC=00:1a:92:55:09:5c:00:18:f6:05:40:6f:08:00 SRC=202.10.89.8 DST=192.168.1.72 LEN=40 TOS=0x00 PREC=0x00 TTL=235 ID=0 DF PROTO=TCP SPT=51099 DPT=50847 WINDOW=32768 RES=0x00 URGP=0
Feb 21 08:44:26 localhost kernel: Shorewall:logflags:DROP:IN=eth0 OUT= MAC=00:1a:92:55:09:5c:00:18:f6:05:40:6f:08:00 SRC=220.233.122.214 DST=192.168.1.72 LEN=40 TOS=0x00 PREC=0x00 TTL=239 ID=0 DF PROTO=TCP SPT=2254 DPT=46261 WINDOW=32768 RES=0x00 URGP=0
Feb 21 08:44:29 localhost last message repeated 3 times
Feb 21 08:50:09 localhost root: Shorewall restarted
Feb 21 09:00:03 localhost root: Shorewall restarted
Feb 21 09:04:23 localhost kernel: Shorewall:logflags:DROP:IN=eth0 OUT= MAC=00:1a:92:55:09:5c:00:18:f6:05:40:6f:08:00 SRC=220.233.122.214 DST=192.168.1.72 LEN=40 TOS=0x00 PREC=0x00 TTL=239 ID=0 DF PROTO=TCP SPT=2254 DPT=57781 WINDOW=32768 RES=0x00 URGP=0
Feb 21 09:04:32 localhost last message repeated 8 times
Feb 21 09:09:01 localhost /USR/SBIN/CRON[19995]: (root) CMD ( [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -print0 | xargs -r -0 rm)
Feb 21 09:17:01 localhost /USR/SBIN/CRON[20213]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Feb 21 09:34:57 localhost -- MARK --
Feb 21 09:39:01 localhost /USR/SBIN/CRON[20838]: (root) CMD ( [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -print0 | xargs -r -0 rm)
Feb 21 09:54:58 localhost -- MARK --
Feb 21 10:09:01 localhost /USR/SBIN/CRON[22096]: (root) CMD ( [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -print0 | xargs -r -0 rm)
Feb 21 10:17:01 localhost /USR/SBIN/CRON[22399]: (root) CMD


/var/log/proftpd/proftpd.log info

Feb 21 05:36:07 server1 proftpd[19377] localhost: error setting IPV6_V6ONLY: Protocol not available
Feb 21 05:36:07 server1 proftpd[19377] localhost: ProFTPD 1.3.0 (stable) (built mar gen 2 10:57:47 CET 2007) standalone mode STARTUP
Feb 21 05:59:51 server1 proftpd[19377] localhost: ProFTPD killed (signal 15)
Feb 21 05:59:51 server1 proftpd[19377] localhost: ProFTPD 1.3.0 standalone mode SHUTDOWN
Feb 21 05:59:53 server1 proftpd[20593] localhost: error setting IPV6_V6ONLY: Protocol not available
Feb 21 05:59:53 server1 proftpd[20593] localhost: ProFTPD 1.3.0 (stable) (built mar gen 2 10:57:47 CET 2007) standalone mode STARTUP
Feb 21 06:13:54 server1 proftpd[20593] localhost: ProFTPD killed (signal 15)
Feb 21 06:13:54 server1 proftpd[20593] localhost: ProFTPD 1.3.0 standalone mode SHUTDOWN
Feb 21 06:15:05 server1 proftpd[5026] localhost: error setting IPV6_V6ONLY: Protocol not available
Feb 21 06:15:05 server1 proftpd[5026] localhost: ProFTPD 1.3.0 (stable) (built mar gen 2 10:57:47 CET 2007) standalone mode STARTUP
Feb 21 06:32:16 server1 proftpd[5026] localhost: ProFTPD killed (signal 15)
Feb 21 06:32:16 server1 proftpd[5026] localhost: ProFTPD 1.3.0 standalone mode SHUTDOWN
Feb 21 06:32:18 server1 proftpd[11118] localhost: error setting IPV6_V6ONLY: Protocol not available
Feb 21 06:32:18 server1 proftpd[11118] localhost: ProFTPD 1.3.0 (stable) (built mar gen 2 10:57:47 CET 2007) standalone mode STARTUP
Feb 21 08:14:16 server1 proftpd[13640] localhost (localhost[::ffff:127.0.0.1]): FTP session closed.
Feb 21 08:20:33 server1 proftpd[13882] localhost (localhost[::ffff:127.0.0.1]): FTP session closed.
Feb 21 08:50:35 server1 proftpd[18090] localhost (::ffff:77.163.218.144[::ffff:77.163.218.144]): FTP session closed.
Feb 21 08:50:40 server1 proftpd[18093] localhost (::ffff:77.163.218.144[::ffff:77.163.218.144]): FTP session closed.
Feb 21 08:50:45 server1 proftpd[18096] localhost (::ffff:77.163.218.144[::ffff:77.163.218.144]): FTP session closed.
Feb 21 08:52:34 server1 proftpd[18145] localhost (Unknown-00-c0-a8-f0-7e-71.lan[::ffff:192.168.1.70]): FTP session closed.
Feb 21 08:52:39 server1 proftpd[18148] localhost (Unknown-00-c0-a8-f0-7e-71.lan[::ffff:192.168.1.70]): FTP session closed.
Feb 21 08:52:44 server1 proftpd[18151] localhost (Unknown-00-c0-a8-f0-7e-71.lan[::ffff:192.168.1.70]): FTP session closed.
Feb 21 08:54:07 server1 proftpd[18183] localhost (Unknown-00-c0-a8-f0-7e-71.lan[::ffff:192.168.1.70]): FTP session closed.
Feb 21 08:54:12 server1 proftpd[18186] localhost (Unknown-00-c0-a8-f0-7e-71.lan[::ffff:192.168.1.70]): FTP session closed.
Feb 21 08:54:17 server1 proftpd[18189] localhost (Unknown-00-c0-a8-f0-7e-71.lan[::ffff:192.168.1.70]): FTP session closed.
Feb 21 08:55:09 server1 proftpd[18210] localhost (Unknown-00-c0-a8-f0-7e-71.lan[::ffff:192.168.1.70]): FTP session closed.
Feb 21 08:55:14 server1 proftpd[18213] localhost (Unknown-00-c0-a8-f0-7e-71.lan[::ffff:192.168.1.70]): FTP session closed.
Feb 21 08:55:19 server1 proftpd[18216] localhost (Unknown-00-c0-a8-f0-7e-71.lan[::ffff:192.168.1.70]): FTP session closed.
Feb 21 09:01:33 server1 proftpd[19782] localhost (::ffff:77.163.218.144[::ffff:77.163.218.144]): FTP session closed.
Feb 21 09:01:38 server1 proftpd[19785] localhost (::ffff:77.163.218.144[::ffff:77.163.218.144]): FTP session closed.
Feb 21 09:01:43 server1 proftpd[19788] localhost (::ffff:77.163.218.144[::ffff:77.163.218.144]): FTP session closed.
Feb 21 09:03:25 server1 proftpd[11118] localhost: ProFTPD killed (signal 15)
Feb 21 09:03:25 server1 proftpd[11118] localhost: ProFTPD 1.3.0 standalone mode SHUTDOWN
Feb 21 09:03:27 server1 proftpd[19844] localhost: ProFTPD 1.3.0 (stable) (built mar gen 2 10:57:47 CET 2007) standalone mode STARTUP
Feb 21 09:03:40 server1 proftpd[19859] localhost (77.163.218.144[77.163.218.144]): FTP session closed.
Feb 21 09:03:45 server1 proftpd[19862] localhost (77.163.218.144[77.163.218.144]): FTP session closed.
Feb 21 09:03:50 server1 proftpd[19865] localhost (77.163.218.144[77.163.218.144]): FTP session closed.
Feb 21 09:06:41 server1 proftpd[19935] localhost (77.163.218.144[77.163.218.144]): FTP session closed.
Feb 21 09:06:47 server1 proftpd[19938] localhost (77.163.218.144[77.163.218.144]): FTP session closed.
Feb 21 09:06:52 server1 proftpd[19941] localhost (77.163.218.144[77.163.218.144]): FTP session closed.
Feb 21 09:13:58 server1 proftpd[20127] localhost (77.163.218.144[77.163.218.144]): FTP session closed.
Feb 21 09:14:03 server1 proftpd[20130] localhost (77.163.218.144[77.163.218.144]): FTP session closed.
Feb 21 09:14:09 server1 proftpd[20133] localhost (77.163.218.144[77.163.218.144]): FTP session closed.
Feb 21 09:14:35 server1 proftpd[20146] localhost (Unknown-00-c0-a8-f0-7e-71.lan[192.168.1.70]): FTP session closed.
Feb 21 09:14:40 server1 proftpd[20149] localhost (Unknown-00-c0-a8-f0-7e-71.lan[192.168.1.70]): FTP session closed.
Feb 21 09:14:45 server1 proftpd[20152] localhost (Unknown-00-c0-a8-f0-7e-71.lan[192.168.1.70]): FTP session closed.
Feb 21 09:35:28 server1 proftpd[20724] localhost (Unknown-00-1a-92-55-09-5c.lan[192.168.1.72]): FTP session closed.
Feb 21 10:05:46 server1 proftpd[21694] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:05:46 server1 proftpd[21695] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:05:46 server1 proftpd[21696] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:05:46 server1 proftpd[21697] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:05:49 server1 proftpd[21702] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:05:49 server1 proftpd[21703] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:05:49 server1 proftpd[21704] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:05:49 server1 proftpd[21705] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:05:52 server1 proftpd[21708] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:05:52 server1 proftpd[21710] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:05:52 server1 proftpd[21711] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:05:52 server1 proftpd[21709] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:05:54 server1 proftpd[21716] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:05:54 server1 proftpd[21717] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:05:54 server1 proftpd[21718] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:05:54 server1 proftpd[21719] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:05:55 server1 proftpd[21722] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:05:55 server1 proftpd[21723] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:05:55 server1 proftpd[21724] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:05:55 server1 proftpd[21725] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:06:03 server1 proftpd[21732] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:06:03 server1 proftpd[21733] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:06:03 server1 proftpd[21734] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:06:03 server1 proftpd[21735] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:06:55 server1 proftpd[21758] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:06:55 server1 proftpd[21759] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:06:55 server1 proftpd[21760] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:06:55 server1 proftpd[21761] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:07:21 server1 proftpd[21774] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:07:21 server1 proftpd[21776] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:07:21 server1 proftpd[21775] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:07:21 server1 proftpd[21777] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:07:22 server1 proftpd[21780] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:07:22 server1 proftpd[21781] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:07:22 server1 proftpd[21782] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:07:22 server1 proftpd[21783] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:07:28 server1 proftpd[21791] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:07:28 server1 proftpd[21790] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:07:28 server1 proftpd[21792] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:07:28 server1 proftpd[21793] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:07:29 server1 proftpd[21796] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:07:29 server1 proftpd[21797] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:07:29 server1 proftpd[21798] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:07:29 server1 proftpd[21799] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:07:29 server1 proftpd[21802] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:07:29 server1 proftpd[21804] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:07:29 server1 proftpd[21805] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:07:29 server1 proftpd[21803] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:07:31 server1 proftpd[21808] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:07:31 server1 proftpd[21809] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:07:31 server1 proftpd[21810] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:07:31 server1 proftpd[21811] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:07:31 server1 proftpd[21815] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:07:31 server1 proftpd[21816] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:07:31 server1 proftpd[21817] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:07:31 server1 proftpd[21814] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:07:32 server1 proftpd[21820] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:07:32 server1 proftpd[21821] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:07:32 server1 proftpd[21822] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:07:32 server1 proftpd[21823] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:07:33 server1 proftpd[21828] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:07:33 server1 proftpd[21829] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:07:33 server1 proftpd[21830] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:07:33 server1 proftpd[21831] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:07:33 server1 proftpd[21834] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:07:33 server1 proftpd[21835] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:07:33 server1 proftpd[21837] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:07:33 server1 proftpd[21836] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:07:34 server1 proftpd[21840] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:07:34 server1 proftpd[21841] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:07:34 server1 proftpd[21842] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:07:34 server1 proftpd[21843] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:07:38 server1 proftpd[21848] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:07:38 server1 proftpd[21849] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:07:38 server1 proftpd[21850] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:07:38 server1 proftpd[21851] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:08:14 server1 proftpd[21868] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:08:14 server1 proftpd[21869] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:08:14 server1 proftpd[21870] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:08:14 server1 proftpd[21871] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:08:15 server1 proftpd[21875] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:08:15 server1 proftpd[21876] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:08:15 server1 proftpd[21877] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:08:15 server1 proftpd[21874] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:08:16 server1 proftpd[21880] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:08:16 server1 proftpd[21881] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:08:16 server1 proftpd[21882] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:08:16 server1 proftpd[21883] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:08:17 server1 proftpd[21886] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:08:17 server1 proftpd[21887] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:08:17 server1 proftpd[21888] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:08:17 server1 proftpd[21889] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:08:18 server1 proftpd[21894] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:08:18 server1 proftpd[21896] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:08:18 server1 proftpd[21897] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:08:18 server1 proftpd[21895] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:08:21 server1 proftpd[21903] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:08:21 server1 proftpd[21904] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:08:21 server1 proftpd[21905] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:08:21 server1 proftpd[21906] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:09:26 server1 proftpd[22124] localhost (77.163.218.144[77.163.218.144]): FTP session closed.
Feb 21 10:09:37 server1 proftpd[22132] localhost (77.163.218.144[77.163.218.144]): FTP session closed.
Feb 21 10:09:54 server1 proftpd[22143] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:09:54 server1 proftpd[22144] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:09:54 server1 proftpd[22145] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:09:54 server1 proftpd[22146] localhost (localhost[127.0.0.1]): FTP session closed.
Feb 21 10:11:03 server1 proftpd[22180] localhost (77.163.218.144[77.163.218.144]): FTP session closed.
Feb 21 10:11:14 server1 proftpd[22207] localhost (Unknown-00-1a-92-55-09-5c.lan[192.168.1.72]): FTP session closed.

topdog
21st February 2008, 12:25
The logs are not very helpfull the exact issue is not being logged. Please verify that mysql is running and that you can connect as the user proftpd is connecting as.

If you can connect then check the proftpd user table to double check if the username and password you are using are in there.

ikkem
21st February 2008, 12:42
@topdog thanks for reacting....
if i type mysql in the user terminal i get....
ERROR 1045 (28000): Access denied for user 'ikkem'@'localhost' (using password: NO)


ftp connection....
ftp 127.0.0.1
Connected to 127.0.0.1.
421 Service not available, remote server has closed connection
ftp>


thanks in advance

topdog
21st February 2008, 12:46
It may be mysql related but the command you typed is wrong try this

mysql -u the_user_proftp_connects_ass -p

ikkem
21st February 2008, 12:53
the output of the command is :

ikkem@server1:~$ mysql -u proftpduser -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 16
Server version: 5.0.32-Debian_7etch5-log Debian etch distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>

thanks in advance....

topdog
21st February 2008, 13:11
use ftp;
select userid,passwd,homedir from ftpuser;


Do you see user name ikkem and your password in there ?

ikkem
21st February 2008, 13:25
@topdog could you please be more specific i am not that fast :)

topdog
21st February 2008, 13:28
I mean connect to the mysql server like i showed you in the previous post then run those sql queries to verify that the user name and password you are using to login in to the ftp server are correct in the database since i have seen that the ftpuser can connect to the db without a problem.

ikkem
21st February 2008, 13:34
@topdog Thanks for the code this is the output...

mysql> select userid,passwd,homedir from ftpuser;
+-----------+-------------------------------------------+----------------------+| userid | passwd | homedir |+-----------+-------------------------------------------+----------------------+| ikkem | *4D92122090AC8A37E694A3B068FC0B727F8BEF35 | /var/proftp/ikkem|

+-----------+-------------------------------------------+----------------------+2 rows in set (0.01 sec)

topdog
21st February 2008, 13:48
can ftpuser/ftpgroup write to /var/proftp/ikkem, further that that i cannot think of anything else :(

ikkem
21st February 2008, 13:52
again I must say I am not that fast please talk slowly:D
which commands should I use to check or make ftpuser/ftpgroup write to /var/proftp/ikkem...

thanks in advance

topdog
21st February 2008, 13:53
again I must say I am not that fast please talk slowly:D
which commands should I use to check or make ftpuser/ftpgroup write to /var/proftp/ikkem...

thanks in advance

ls -l /var/proftp
ls -l /var/

ikkem
21st February 2008, 13:58
@topdog Thanks for pointing me in the right direction


ls -l /var/proftp =drwxrwxr-x 2 ftpuser ftpgroup 4096 2008-02-21 05:55 proftp

ls -l /var/=drwxrwxr-x 2 ftpuser ftpgroup 4096 2008-02-21 05:55 proftp



thanks in advance....

topdog
21st February 2008, 14:04
Okay i think i know what the problem is i have just glanced through the howto, i think the system expects clear text passwords and your password in the db is encrypted. You need to change the password to cleartext then test.
http://www.howtoforge.com/proftpd_mysql_virtual_hosting_debian_etch_p3

remember to reload proftpd after you have made the change.

ikkem
21st February 2008, 14:39
thanks again topdog I have tried changing it to clear text but I still get the error message....

Status: Connecting to 127.0.0.1:21...
Status: Connection established, waiting for welcome message...

Status: Connecting to myip:21...
Status: Connection established, waiting for welcome message...
Error: Could not connect to server
Error: Could not connect to server

Thanks in advance....
ikkem

topdog
21st February 2008, 14:46
Isn't it a different error now as even the welcome message is not being displayed.

ikkem
21st February 2008, 17:08
@topdog the error message is different indeed after some made changes I get this error message
Status: Connecting to myexternalip...
Status: Connection established, waiting for welcome message...
Response: 220 ProFTPD 1.3.0 Server (server1) [myexternalip]
Command: USER ikkem
Response: 331 Password required for ikkem.
Command: PASS ********
Response: 530 Login incorrect.
Error: Could not connect to server

the output of /var/log/proftpd/proftpd.log=
Feb 21 16:08:46 server1 proftpd[20496] server1 (server1[127.0.0.1]): FTP session opened.
Feb 21 16:08:46 server1 proftpd[20496] server1 (server1[127.0.0.1]): mod_delay/0.5: delaying for 31 usecs
Feb 21 16:08:46 server1 proftpd[20496] server1 (server1[127.0.0.1]): no such user 'ikkem'
Feb 21 16:08:46 server1 proftpd[20496] server1 (server1[127.0.0.1]): USER ikkem: no such user found from server1 [127.0.0.1] to 127.0.0.1:21
Feb 21 16:08:46 server1 proftpd[20496] server1 (server1[127.0.0.1]): mod_delay/0.5: delaying for 10 usecs
Feb 21 16:08:46 server1 proftpd[20496] server1 (server1[127.0.0.1]): FTP session closed.



Thanks in advance.....

ikkem

falko
22nd February 2008, 18:35
What's in your proftpd.conf?

ikkem
22nd February 2008, 20:58
hi falko thanks for reacting the config file looks like this....
#
# /etc/proftpd/proftpd.conf -- This is a basic ProFTPD configuration file.
# To really apply changes reload proftpd after modifications.
#

# Includes DSO modules
Include /etc/proftpd/modules.conf
RootLogin off
RequireValidShell off

# Set off to disable IPv6 support which is annoying on IPv4 only boxes.
UseIPv6 off

ServerName "server1"
ServerType standalone
DeferWelcome off

MultilineRFC2228 on
DefaultServer on
ShowSymlinks on

TimeoutNoTransfer 600
TimeoutStalled 600
TimeoutIdle 1200

DisplayLogin welcome.msg
DisplayFirstChdir .message
ListOptions "-l"

DenyFilter \*.*/

# Port 21 is the standard FTP port.
Port 21

# In some cases you have to specify passive ports range to by-pass
# firewall limitations. Ephemeral ports can be used for that, but
# feel free to use a more narrow range.
PassivePorts 2899 2901

# To prevent DoS attacks, set the maximum number of child processes
# to 30. If you need to allow more than 30 concurrent connections
# at once, simply increase this value. Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd)
MaxInstances 30

# Set the user and group that the server normally runs at.
User proftpd
Group nogroup

# Umask 022 is a good standard umask to prevent new files and dirs
# (second parm) from being group and world writable.
Umask 022 022
# Normally, we want files to be overwriteable.
AllowOverwrite on

# Uncomment this if you are using NIS or LDAP to retrieve passwords:
# PersistentPasswd off

# Be warned: use of this directive impacts CPU average load!
#
# Uncomment this if you like to see progress and transfer rate with ftpwho
# in downloads. That is not needed for uploads rates.
# UseSendFile off

TransferLog /var/log/proftpd/xferlog
SystemLog /var/log/proftpd/proftpd.log

<IfModule mod_tls.c>
TLSEngine off
</IfModule>

<IfModule mod_quota.c>
QuotaEngine on
</IfModule>

<IfModule mod_ratio.c>
Ratios on
</IfModule>


# Delay engine reduces impact of the so-called Timing Attack described in
# http://security.lss.hr/index.php?page=details&ID=LSS-2004-10-02
# It is on by default.
<IfModule mod_delay.c>
DelayEngine on
</IfModule>

<IfModule mod_ctrls.c>
ControlsEngine on
ControlsMaxClients 2
ControlsLog /var/log/proftpd/controls.log
ControlsInterval 5
ControlsSocket /var/run/proftpd/proftpd.sock
</IfModule>

<IfModule mod_ctrls_admin.c>
AdminControlsEngine on
</IfModule>
DefaultRoot ~


# The passwords in MySQL are encrypted using CRYPT
SQLAuthTypes Plaintext Crypt
SQLAuthenticate users groups


# used to connect to the database
# databasename@host database_user user_password
SQLConnectInfo ftp@localhost proftpd password


# Here we tell ProFTPd the names of the database columns in the "usertable"
# we want it to interact with. Match the names with those in the db
SQLUserInfo ftpuser userid passwd uid gid homedir shell

# Here we tell ProFTPd the names of the database columns in the "grouptable"
# we want it to interact with. Again the names match with those in the db
SQLGroupInfo ftpgroup groupname gid members

# set min UID and GID - otherwise these are 999 each
SQLMinID 500

# create a user's home directory on demand if it doesn't exist
SQLHomedirOnDemand on

# Update count every time user logs in
SQLLog PASS updatecount
SQLNamedQuery updatecount UPDATE "count=count+1, accessed=now() WHERE userid='%u'" ftpuser

# Update modified everytime user uploads or deletes a file
SQLLog STOR,DELE modified
SQLNamedQuery modified UPDATE "modified=now() WHERE userid='%u'" ftpuser

# User quotas
# ===========
QuotaEngine on
QuotaDirectoryTally on
QuotaDisplayUnits Mb
QuotaShowQuotas on

SQLNamedQuery get-quota-limit SELECT "name, quota_type, per_session, limit_type, bytes_in_avail, bytes_out_avail, bytes_xfer_avail, files_in_avail, files_out_avail, files_xfer_avail FROM ftpquotalimits WHERE name = '%{0}' AND quota_type = '%{1}'"

SQLNamedQuery get-quota-tally SELECT "name, quota_type, bytes_in_used, bytes_out_used, bytes_xfer_used, files_in_used, files_out_used, files_xfer_used FROM ftpquotatallies WHERE name = '%{0}' AND quota_type = '%{1}'"

SQLNamedQuery update-quota-tally UPDATE "bytes_in_used = bytes_in_used + %{0}, bytes_out_used = bytes_out_used + %{1}, bytes_xfer_used = bytes_xfer_used + %{2}, files_in_used = files_in_used + %{3}, files_out_used = files_out_used + %{4}, files_xfer_used = files_xfer_used + %{5} WHERE name = '%{6}' AND quota_type = '%{7}'" ftpquotatallies

SQLNamedQuery insert-quota-tally INSERT "%{0}, %{1}, %{2}, %{3}, %{4}, %{5}, %{6}, %{7}" ftpquotatallies

QuotaLimitTable sql:/get-quota-limit
QuotaTallyTable sql:/get-quota-tally/update-quota-tally/insert-quota-tally

RootLogin off
RequireValidShell off



# A basic anonymous configuration, no upload directories.

# <Anonymous ~ftp>
# User ftp
# Group nogroup
# # We want clients to be able to login with "anonymous" as well as "ftp"
# UserAlias anonymous ftp
# # Cosmetic changes, all files belongs to ftp user
# DirFakeUser on ftp
# DirFakeGroup on ftp
#
# RequireValidShell off
#
# # Limit the maximum number of anonymous logins
# MaxClients 10
#
# # We want 'welcome.msg' displayed at login, and '.message' displayed
# # in each newly chdired directory.
# DisplayLogin welcome.msg
# DisplayFirstChdir .message
#
# # Limit WRITE everywhere in the anonymous chroot
# <Directory *>
# <Limit WRITE>
# DenyAll
# </Limit>
# </Directory>
#
# # Uncomment this if you're brave.
# # <Directory incoming>
# # # Umask 022 is a good standard umask to prevent new files and dirs
# # # (second parm) from being group and world writable.
# # Umask 022 022
# # <Limit READ WRITE>
# # DenyAll
# # </Limit>
# # <Limit STOR>
# # AllowAll
# # </Limit>
# # </Directory>
#
# </Anonymous>


Thanks in advance....

ikkem
22nd February 2008, 21:42
now i get this error message when i try to connect to mysql could someone please help me to sort it out....
thanks in advance....
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!

topdog
23rd February 2008, 02:09
Your mysql server is not running you need to start it.

/etc/init.d/mysql start

ikkem
23rd February 2008, 02:21
Finally I got it working now after googling for a solution and reading all your helpful posts I have a working ftp server now I am gonna test it also i will post how I got it working later on....

ikkem
24th February 2008, 13:12
These are the commands I use to start mysql
killall -9 mysqld && touch /var/run/mysqld/mysqld.pid && touch /var/run/mysqld/mysqld.sock && /etc/init.d/mysql start The weird thing is that I need to give these commands every time my system restarts....

The errors I got from proftpd were because of the fact that I did not configure the system to act as a server properly so in order to fix it I configured the system according to the how to by falko the perfect setup debian etch http://www.howtoforge.com/perfect_setup_debian_etch.

I also used the info from this page to set mysql http://www.howtoforge.com/forums/showthread.php?t=7228&highlight=mysqladmin+server1.example.com

ikkem
24th February 2008, 13:17
After some testing I found that the client cannot down or upload files to the directory they can login and see the files but they cannot down or upload files.

if i login locally it works ok
remote logins are ok also but the client cannot down/upload files

can someone point me into the right direction
thanks in advance

ikkem

falko
25th February 2008, 17:55
Have you tried both active and passive transfers in your FTP client?

ikkem
26th February 2008, 00:55
hi thanks for reacting,
I specified active and passive mode in proftpd conf and also set the firewall rules

thanks in advance

ikkem

falko
26th February 2008, 20:38
Any errors in your logs?
What exactly did you modify in the firewall? What ports are open now?