Author Topic: unable to connect via ftp  (Read 6708 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
unable to connect via ftp
« on: March 15, 2022, 07:49:35 PM »
Good afternoon, I read in the forum everything related to the ftp connection, configure a user but it is impossible to connect, the connection in filezilla is that in retrieving directory listing and then it gives an error due to timeout.
Any suggestion?

Offline
***
Re: unable to connect via ftp
« Reply #1 on: March 15, 2022, 11:44:05 PM »
What's in your logs (just the last lines) when you issue the following command?:
Code: [Select]
# grep 'pure-ftpd' /var/log/messages
Regards,
Netino

Offline
*
Re: unable to connect via ftp
« Reply #2 on: March 16, 2022, 01:21:52 AM »
Mar 13 15:49:55 vps-2434395-x yum[3251]: Installed: pure-ftpd-1.0.47-4.el7.x86_6                                                                                        4
Mar 13 15:49:56 vps-2434395-x systemd: Can't open PID file /var/run/pure-ftpd.pi                                                                                        d (yet?) after start: No such file or directory
Mar 13 15:52:58 vps-2434395-x systemd: Can't open PID file /var/run/pure-ftpd.pi                                                                                        d (yet?) after start: No such file or directory
Mar 13 16:15:36 vps-2434395-x systemd: Can't open PID file /var/run/pure-ftpd.pi                                                                                        d (yet?) after start: No such file or directory
Mar 13 16:19:29 vps-2434395-x systemd: Can't open PID file /var/run/pure-ftpd.pi                                                                                        d (yet?) after start: No such file or directory
Mar 15 16:18:13 vps-2434395-x pure-ftpd: (?@190.247.116.2) [INFO] New connection                                                                                         from 190.247.116.2
Mar 15 16:18:15 vps-2434395-x pure-ftpd: (?@190.247.116.2) [INFO] TLS: Enabled T                                                                                        LSv1/SSLv3 with ECDHE-RSA-AES256-GCM-SHA384, 256 secret bits cipher
Mar 15 16:18:25 vps-2434395-x pure-ftpd: (?@190.247.116.2) [WARNING] Authenticat                                                                                        ion failed for user [fullstreaming]
Mar 15 16:18:25 vps-2434395-x pure-ftpd: (?@190.247.116.2) [INFO] Logout.
Mar 15 16:18:58 vps-2434395-x pure-ftpd: (?@190.247.116.2) [INFO] New connection                                                                                         from 190.247.116.2
Mar 15 16:18:59 vps-2434395-x pure-ftpd: (?@190.247.116.2) [INFO] TLS: Enabled T                                                                                        LSv1/SSLv3 with ECDHE-RSA-AES256-GCM-SHA384, 256 secret bits cipher
Mar 15 16:18:59 vps-2434395-x pure-ftpd: (?@190.247.116.2) [INFO] fullstreaming                                                                                         is now logged in
Mar 15 16:19:21 vps-2434395-x pure-ftpd: (?@190.247.116.2) [INFO] New connection                                                                                         from 190.247.116.2
Mar 15 16:19:21 vps-2434395-x pure-ftpd: (?@190.247.116.2) [INFO] TLS: Enabled T                                                                                        LSv1/SSLv3 with ECDHE-RSA-AES256-GCM-SHA384, 256 secret bits cipher
Mar 15 16:19:21 vps-2434395-x pure-ftpd: (?@190.247.116.2) [INFO] fullstreaming                                                                                         is now logged in
Mar 15 16:22:13 vps-2434395-x pure-ftpd: (?@190.247.116.2) [INFO] New connection                                                                                         from 190.247.116.2
Mar 15 16:22:14 vps-2434395-x pure-ftpd: (?@190.247.116.2) [INFO] TLS: Enabled T                                                                                        LSv1/SSLv3 with ECDHE-RSA-AES256-GCM-SHA384, 256 secret bits cipher
Mar 15 16:22:14 vps-2434395-x pure-ftpd: (?@190.247.116.2) [INFO] fullstreaming                                                                                         is now logged in
Mar 15 16:23:02 vps-2434395-x pure-ftpd: (?@190.247.116.2) [INFO] New connection                                                                                         from 190.247.116.2
Mar 15 16:23:02 vps-2434395-x pure-ftpd: (?@190.247.116.2) [INFO] TLS: Enabled T                                                                                        LSv1/SSLv3 with ECDHE-RSA-AES256-GCM-SHA384, 256 secret bits cipher
Mar 15 16:23:09 vps-2434395-x pure-ftpd: (?@190.247.116.2) [INFO] fullstreaming                                                                                         is now logged in
Mar 15 16:23:30 vps-2434395-x pure-ftpd: (?@190.247.116.2) [INFO] New connection                                                                                         from 190.247.116.2
Mar 15 16:23:30 vps-2434395-x pure-ftpd: (?@190.247.116.2) [INFO] TLS: Enabled T                                                                                        LSv1/SSLv3 with ECDHE-RSA-AES256-GCM-SHA384, 256 secret bits cipher
Mar 15 16:23:30 vps-2434395-x pure-ftpd: (?@190.247.116.2) [INFO] fullstreaming                                                                                         is now logged in
Mar 15 16:25:44 vps-2434395-x pure-ftpd: (?@190.247.116.2) [INFO] New connection                                                                                         from 190.247.116.2
Mar 15 16:25:58 vps-2434395-x pure-ftpd: (?@190.247.116.2) [INFO] fullstreaming                                                                                         is now logged in
Mar 15 16:26:19 vps-2434395-x pure-ftpd: (?@190.247.116.2) [INFO] New connection                                                                                         from 190.247.116.2
Mar 15 16:26:19 vps-2434395-x pure-ftpd: (?@190.247.116.2) [INFO] fullstreaming                                                                                         is now logged in
Mar 15 16:27:31 vps-2434395-x pure-ftpd: (?@190.247.116.2) [INFO] New connection                                                                                         from 190.247.116.2
Mar 15 16:27:31 vps-2434395-x pure-ftpd: (?@190.247.116.2) [INFO] fullstreaming                                                                                         is now logged in
Mar 15 16:27:51 vps-2434395-x pure-ftpd: (?@?) [WARNING] Too many connections (8                                                                                        ) from this IP: [190.247.116.2]
Mar 15 16:34:01 vps-2434395-x pure-ftpd: (fullstreaming@190.247.116.2) [INFO] Ti                                                                                        meout
Mar 15 16:34:21 vps-2434395-x pure-ftpd: (fullstreaming@190.247.116.2) [INFO] Ti                                                                                        meout
Mar 15 16:36:21 vps-2434395-x systemd: Can't open PID file /var/run/pure-ftpd.pi                                                                                        d (yet?) after start: No such file or directory
Mar 15 16:37:14 vps-2434395-x pure-ftpd: (fullstreaming@190.247.116.2) [INFO] Ti                                                                                        meout
Mar 15 16:37:33 vps-2434395-x pure-ftpd: (?@190.247.116.2) [INFO] New connection                                                                                         from 190.247.116.2
Mar 15 16:37:40 vps-2434395-x pure-ftpd: (?@190.247.116.2) [INFO] fullstre@fulls                                                                                        treaming.ar is now logged in
Mar 15 16:38:00 vps-2434395-x pure-ftpd: (?@190.247.116.2) [INFO] New connection                                                                                         from 190.247.116.2
Mar 15 16:38:00 vps-2434395-x pure-ftpd: (?@190.247.116.2) [INFO] fullstre@fulls                                                                                        treaming.ar is now logged in
Mar 15 16:38:10 vps-2434395-x pure-ftpd: (fullstreaming@190.247.116.2) [INFO] Ti                                                                                        meout
Mar 15 16:38:30 vps-2434395-x pure-ftpd: (fullstreaming@190.247.116.2) [INFO] Ti                                                                                        meout
Mar 15 16:40:58 vps-2434395-x pure-ftpd: (fullstreaming@190.247.116.2) [INFO] Ti                                                                                        meout
Mar 15 16:41:19 vps-2434395-x pure-ftpd: (fullstreaming@190.247.116.2) [INFO] Ti                                                                                        meout
Mar 15 16:41:50 vps-2434395-x systemd: Can't open PID file /var/run/pure-ftpd.pi                                                                                        d (yet?) after start: No such file or directory
Mar 15 16:42:31 vps-2434395-x pure-ftpd: (fullstreaming@190.247.116.2) [INFO] Ti                                                                                        meout
Mar 15 20:23:05 vps-2434395-x pure-ftpd: (?@5.188.62.76) [INFO] New connection f                                                                                        rom 5.188.62.76
Mar 15 20:23:19 vps-2434395-x pure-ftpd: (?@5.188.62.76) [WARNING] Authenticatio                                                                                        n failed for user [mifm]
Mar 15 20:23:20 vps-2434395-x pure-ftpd: (?@5.188.62.76) [INFO] Logout.
Mar 15 21:28:07 vps-2434395-x pure-ftpd: (?@192.241.216.107) [INFO] New connecti                                                                                        on from 192.241.216.107
Mar 15 21:28:08 vps-2434395-x pure-ftpd: (?@192.241.216.107) [INFO] Logout.

Offline
***
Re: unable to connect via ftp
« Reply #3 on: March 16, 2022, 11:19:31 PM »
Seems you are having problem with PID file.
Check if your /var/run directory exists, and have the right permissions (0755) wih the command: ls -alF /var/run


Offline
*
Re: unable to connect via ftp
« Reply #4 on: March 17, 2022, 05:26:56 PM »
[root@server1 ~] # ls -alF /var/run
lrwxrwxrwx. 1 root root 6 dic  3 15:50 /var/run -> ../run/

Offline
***
Re: unable to connect via ftp
« Reply #5 on: March 17, 2022, 10:42:39 PM »
[root@server1 ~] # ls -alF /var/run
lrwxrwxrwx. 1 root root 6 dic  3 15:50 /var/run -> ../run/

It's just a symbolic link.
Check the real directory: ls -alF /run

Offline
*
Re: unable to connect via ftp
« Reply #6 on: March 19, 2022, 03:11:49 PM »
[root@server1 ~] # ls -alF /run
total 40
drwxr-xr-x  34 root     root       1000 mar 19 08:32 ./
dr-xr-xr-x. 21 root     root       4096 mar 16 12:23 ../
-rw-r--r--   1 root     root          4 mar 16 12:23 acpid.pid
srw-rw-rw-   1 root     root          0 mar 16 12:23 acpid.socket=
drwxr-xr-x   2 amavis   amavis       40 mar 16 12:23 amavisd/
-rw-r--r--   1 root     root          4 mar 16 12:23 atd.pid
drwxr-xr-x   2 root     root         80 mar 16 12:23 blkid/
drwxrwx---   2 amavis   clamupdate   40 mar 16 12:23 clamd.amavisd/
drwx--x---   2 clamscan virusgroup   40 mar 16 12:23 clamd.scan/
drwxr-xr-x   2 root     root         40 mar 16 12:23 console/
----------   1 root     root          0 mar 16 12:23 cron.reboot
-rw-r--r--   1 root     root          4 mar 16 12:23 crond.pid
drwx------   2 root     root         40 mar 16 12:23 cryptsetup/
drwxr-xr-x   2 root     root         60 mar 16 12:23 dbus/
-rw-r--r--   1 root     root          4 mar 16 12:23 dhclient-eth0.pid
prw-------   1 root     root          0 mar 16 12:23 dmeventd-client|
prw-------   1 root     root          0 mar 16 12:23 dmeventd-server|
drwxr-xr-x   5 root     dovecot     760 mar 17 13:18 dovecot/
drwxr-xr-x   2 root     root         40 mar 16 12:23 faillock/
drwxr-xr-x   3 root     root         60 mar 16 12:23 initramfs/
drwxr-xr-x   2 root     root         40 mar 16 12:23 iptraf-ng/
drwxr-xr-x   4 root     root         80 mar 19 08:34 lock/
drwxr-xr-x   3 root     root         60 mar 16 12:23 log/
drwxr-xr-x   2 root     root         40 mar 16 12:23 mount/
drwxr-xr-x   2 named    named        80 mar 17 13:15 named/
drwxr-xr-x   2 root     root         40 mar 16 12:23 net-snmp/
drwxrwxr-x   2 root     root         40 mar 16 12:23 netreport/
drwx------   2 opendkim opendkim     40 mar 16 12:23 opendkim/
drwxr-xr-x   2 root     root         40 mar 16 12:23 plymouth/
drwxr-xr-x   2 root     root         40 mar 16 12:23 portreserve/
drwx------   2 root     root         40 mar 19 10:41 pure-ftpd/
-rw-r--r--   1 root     root          4 mar 16 12:23 pure-ftpd.pid
-rw-------   1 root     root         25 mar 16 12:23 qga.state
drwx------   2 rpc      rpc          40 mar 16 12:23 rpcbind/
-r--r--r--   1 root     root          0 mar 16 12:23 rpcbind.lock
srw-rw-rw-   1 root     root          0 mar 16 12:23 rpcbind.sock=
drwxrwxr-x   2 root     screen       40 mar 16 12:23 screen/
drwxr-xr-x   2 root     root         40 mar 16 12:23 sepermit/
drwxr-xr-x   2 root     root         40 mar 16 12:23 setrans/
-rw-r--r--   1 root     root          4 mar 16 12:23 sshd.pid
drwx--x--x   3 root     root         60 mar 16 12:23 sudo/
drwx------   2 root     root         40 mar 16 12:23 svnserve/
-rw-------   1 root     root          3 mar 16 12:23 syslogd.pid
drwxr-xr-x  16 root     root        400 mar 19 08:32 systemd/
drwxr-xr-x   2 root     root         60 mar 16 12:23 tmpfiles.d/
drwxr-xr-x   2 root     root         60 mar 16 12:23 tuned/
drwxr-xr-x   7 root     root        160 mar 16 12:23 udev/
drwxr-xr-x   3 root     root         60 mar 19 03:00 user/
-rw-rw-r--   1 root     utmp       1536 mar 19 12:10 utmp
-rw-------   1 root     root          0 mar 16 12:23 xtables.lock

Offline
***
Re: unable to connect via ftp
« Reply #7 on: March 21, 2022, 02:31:29 AM »
Seems your configuration is normal.
The two following lines are showin something strange, related to the same network:
Code: [Select]
Mar 15 16:38:00 vps-2434395-x pure-ftpd: (?@190.247.116.2) [INFO] fullstre@fullstreaming.ar is now logged in
Mar 15 16:38:10 vps-2434395-x pure-ftpd: (fullstreaming@190.247.116.2) [INFO] Timeout

The first one for user 'fullstre' is logged in, but the second for the same IP address for user 'fullstreaming' is not.
The second is returning "Timeout" problem, this is related to the network.
The home directory for that user really exists?

Offline
****
Re: unable to connect via ftp
« Reply #8 on: March 21, 2022, 07:55:27 AM »
Edit /etc/pure-ftpd/pure-ftpd.conf

change or enable:
PassivePortRange          30000 50000
ForcePassiveIP               (Your Server Global IP)

Edit /etc/csf/csf.conf
find TCP_IN and add 30000:50000
find TCP_OUT and add 30000:50000 (Unless you have 1:65535 already)
if you have ipv6:
find TCP6_IN and add 30000:50000
find TCP6_OUT and add 30000:50000

systemctl restart pure-ftpd
csf -r
Google Hangouts:  rcschaff82@gmail.com

Offline
*
Re: unable to connect via ftp
« Reply #9 on: March 22, 2022, 01:03:57 PM »
Good morning, I made the changes suggested by you, but the problem persists. I pass you the Filezilla log.
Command: TYPE I
Answer: 200 TYPE is now 8-bit binary
Command: PASV
Answer: 227 Entering Passive Mode (66,97,36,157,187,48)
Command: MLSD
Error: Connection timed out after 20 seconds of inactivity
Error: Failed to retrieve directory listing
Status: Disconnected from the server
Status: Resolving the enlaweb.com.ar address
Status: Connecting to 66.97.36.157:21...
Status: Connection established, waiting for welcome message...
Status: Plain FTP is insecure. Please switch to FTP over TLS.
Status: Registered in
Status: Retrieving directory listing...
Command: PWD
Response: 257 "/" is your current location
Command: TYPE I
Answer: 200 TYPE is now 8-bit binary
Command: PASV
Answer: 227 Entering Passive Mode (66,97,36,157,156,216)
Command: MLSD
Error: Connection timed out after 20 seconds of inactivity
Error: Failed to retrieve directory listing

Offline
****
Re: unable to connect via ftp
« Reply #10 on: March 22, 2022, 02:16:00 PM »
Is your Server behind a SEC-Group Firewall at the host?  IF so, the ports also need to be allowed there.
Google Hangouts:  rcschaff82@gmail.com

Offline
*
Re: unable to connect via ftp
« Reply #11 on: March 22, 2022, 02:26:23 PM »
Thank you very much it already works I forgot about the firewall of my VPS provider