Discussion:
[Proftpd-user] Need some help with basic issues.
MARK ADAMS
2016-12-11 08:33:54 UTC
Permalink
First, I tried to register for an account at forums.proftpd.org. I received my activation email but attempts to log in with those credentials results in "User does not exist". Is there any way to overcome that? The forum looks like a great resource and I'd really like to get into it.

As for actual technical support, I've got a proftpd installation that is not allowing me to access file lists (ls). Here are some particulars:

Linux shuttle 4.4.36-desktop-2.mga5 #1 SMP Tue Dec 6 16:56:06 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

ProFTPD Version 1.3.5b

I didn't want to clutter things up with my configuration file, so It can be found in pastebin: http://pastebin.com/CdaRHpHN

My Shorewall firewall dump is here: http://pastebin.com/8CWcF6i9


I can get an "nlist" okay, but when I try to "ls" it locks up on "150 Opening ASCII mode data connection for file list."

It looks kind of like this:

2016-12-09 22:18:27 21283 1 Status: Resolving address of adams-lan.org
2016-12-09 22:18:27 21283 1 Status: Connecting to 64.130.94.10:21...
2016-12-09 22:18:27 21283 1 Status: Connection established, waiting for welcome message...
2016-12-09 22:18:27 21283 1 Response: 220 ProFTPD 1.3.5b Server (ProFTPD Default Installation) [64.130.94.10]
2016-12-09 22:18:27 21283 1 Command: AUTH TLS
2016-12-09 22:18:27 21283 1 Response: 500 AUTH not understood
2016-12-09 22:18:27 21283 1 Command: AUTH SSL
2016-12-09 22:18:27 21283 1 Response: 500 AUTH not understood
2016-12-09 22:18:27 21283 1 Status: Insecure server, it does not support FTP over TLS.
2016-12-09 22:18:27 21283 1 Command: USER madams
2016-12-09 22:18:27 21283 1 Response: 331 Password required for madams
2016-12-09 22:18:27 21283 1 Command: PASS ********
2016-12-09 22:18:27 21283 1 Response: 230 User madams logged in
2016-12-09 22:18:27 21283 1 Command: OPTS UTF8 ON
2016-12-09 22:18:27 21283 1 Response: 200 UTF8 set to on
2016-12-09 22:18:27 21283 1 Status: Logged in
2016-12-09 22:18:27 21283 1 Status: Retrieving directory listing...
2016-12-09 22:18:27 21283 1 Command: PWD
2016-12-09 22:18:27 21283 1 Response: 257 "/" is the current directory
2016-12-09 22:18:27 21283 1 Command: TYPE I
2016-12-09 22:18:27 21283 1 Response: 200 Type set to I
2016-12-09 22:18:27 21283 1 Command: PASV
2016-12-09 22:18:27 21283 1 Response: 227 Entering Passive Mode (64,130,94,10,240,63).
2016-12-09 22:18:27 21283 1 Command: LIST
2016-12-09 22:18:28 21283 1 Error: The data connection could not be established: ECONNREFUSED - Connection refused by server
2016-12-09 22:18:43 21283 1 Error: Connection timed out after 15 seconds of inactivity
2016-12-09 22:18:43 21283 1 Error: Failed to retrieve directory listing
2016-12-09 22:22:44 21283 1 Status: Disconnected from server


I've been over the network configuration guide. I am showing port 21 open. I have forwarded port 60000-65000 on my NAT router and in my firewall.

I've tried connecting to my server by domain name (adams-lan.org) and by the ip address returned by that domain name.

I am getting the same result on my desktop in Filezilla as well as when I run Filezilla on the server itself.

This happens in the command-line ftp clients I have used as well as Filzilla.

The network configuration wizard in Filezilla passes with no error:

Response: 200 Using port 63345, data token 1440906946
PORT 64,130,94,10,247,113
Response: 200 PORT command successful
LIST
Response: 150 opening data connection
Response: 200 Successful
QUIT
Response: 200 goodbye!
Connection closed
Test finished successfully

If I log directly into the server with a local user, I can connect to ftp and get a list with no problem.

If I log into my domain with a local user, it just hangs at: "150 Opening ASCII mode data connection for file list".

Using the lftp client, when I enter "ls" I see "waiting for response..." and then "connection refused". That's not all that helpful, but I can't find any log information from lftp.

Here is the journalctl info generated by a log in and attempted "ls" from lftp:


Dec 11 01:27:44 shuttle proftpd[3360]: PAM (proftpd) illegal module type: ~
Dec 11 01:27:44 shuttle proftpd[3360]: PAM (proftpd) no control flag supplied
Dec 11 01:27:44 shuttle proftpd[3360]: PAM (proftpd) no module name supplied
Dec 11 01:27:44 shuttle proftpd[3360]: pam_tcb(proftpd:auth): Authentication passed for madams from (uid=0)
Dec 11 01:27:44 shuttle proftpd[3360]: pam_tcb(proftpd:session): Session opened for madams by (uid=0)
Dec 11 01:27:44 shuttle proftpd[3360]: pam_env(proftpd:setcred): Unable to open config file: /etc/security/pam_env.conf: No such file or directory
Dec 11 01:27:44 shuttle proftpd[3360]: pam_tcb(proftpd:session): Session closed for madams


Given the information above, I'm sure there is something between the machine running proftpd and the Internet. I just don't know what it would be.


/var/log/proftpd/proftpd.log registers this:

2016-12-11 00:55:09,202 shuttle proftpd[32687] 192.168.1.105 (192.168.1.105[192.168.1.105]): FTP session opened.
2016-12-11 00:55:12,144 shuttle proftpd[32687] 192.168.1.105 (192.168.1.105[192.168.1.105]): USER madams: Login successful.
2016-12-11 00:55:18,172 shuttle proftpd[32687] 192.168.1.105 (192.168.1.105[192.168.1.105]): FTP session closed.
2016-12-11 00:55:24,444 shuttle proftpd[32713] 192.168.1.105 (192.168.1.1[192.168.1.1]): FTP session opened.
2016-12-11 00:55:27,397 shuttle proftpd[32713] 192.168.1.105 (192.168.1.1[192.168.1.1]): USER madams: Login successful.
2016-12-11 00:55:41,854 shuttle proftpd[32713] 192.168.1.105 (192.168.1.1[192.168.1.1]): notice: user madams: aborting transfer: Data connection closed
2016-12-11 00:55:41,854 shuttle proftpd[32713] 192.168.1.105 (192.168.1.1[192.168.1.1]): FTP session closed.

journalctl -xe shows:

Dec 11 01:02:09 shuttle proftpd[409]: pam_env(proftpd:setcred): Unable to open config file: /etc/security/pam_env.conf: No such file or directory
Dec 11 01:02:09 shuttle proftpd[409]: pam_tcb(proftpd:session): Session closed for madams

The file in question does exist:
-rw-r--r-- 1 root root 2972 Jul 1 2015 /etc/security/pam_env.conf

That file is also 100% commented out.

I've been working on this off and on for the last week. It's not getting any better. Any help appreciated on either or both of these issues.

Thank you.
--
Mark Adams

"READ CAREFULLY, by reading this email, you agree, on behalf of your employer,
to release me from all obligations and waivers arising from any and all
NON-NEGOTIATED agreements, licences, terms-of-service, shrinkwrap, clickwrap,
browsewrap, confidentiality, non-disclosure, non-compete and acceptable use
policies ("BOGUS AGREEMENTS") that I have entered into with your employer, its
partners, licensors, agents and assigns, in perpetuity, without prejudice to my
ongoing rights and privileges. You further represent that you have the authority
to release me from any BOGUS AGREEMENTS on behalf of your employer."
MARK ADAMS
2016-12-11 22:34:18 UTC
Permalink
I believe I have resolved this one.


Found this in a Google search: https://www.digitalocean.com/community/questions/sftp-connection-error-received-unexpected-end-of-file-from-sftp-server

Reading down the article I see:
I was able to solve my issue by logging into SSH and editing the sshd_config file:

sudo nano /etc/ssh/sshd_config

Then scroll down until you see this line:

# Subsystem sftp /usr/lib/openssh/sftp-server

Leave that line commented out, but underneath it write this:

Subsystem sftp internal-sftp

Then power cycle your server and the problem should be fixed. I'm now using the latest version of Filezilla wi


Made the edit, restarted sshd and there was much joy. Filezilla and my FTP cli clients all work as expected.

Wanted to post this record.


On 12/11/2016 01:33 AM, MARK ADAMS wrote:
First, I tried to register for an account at forums.proftpd.org. I received my activation email but attempts to log in with those credentials results in "User does not exist". Is there any way to overcome that? The forum looks like a great resource and I'd really like to get into it.

As for actual technical support, I've got a proftpd installation that is not allowing me to access file lists (ls). Here are some particulars:

Linux shuttle 4.4.36-desktop-2.mga5 #1 SMP Tue Dec 6 16:56:06 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

ProFTPD Version 1.3.5b

I didn't want to clutter things up with my configuration file, so It can be found in pastebin: http://pastebin.com/CdaRHpHN

My Shorewall firewall dump is here: http://pastebin.com/8CWcF6i9


I can get an "nlist" okay, but when I try to "ls" it locks up on "150 Opening ASCII mode data connection for file list."

It looks kind of like this:

2016-12-09 22:18:27 21283 1 Status: Resolving address of adams-lan.org
2016-12-09 22:18:27 21283 1 Status: Connecting to 64.130.94.10:21...
2016-12-09 22:18:27 21283 1 Status: Connection established, waiting for welcome message...
2016-12-09 22:18:27 21283 1 Response: 220 ProFTPD 1.3.5b Server (ProFTPD Default Installation) [64.130.94.10]
2016-12-09 22:18:27 21283 1 Command: AUTH TLS
2016-12-09 22:18:27 21283 1 Response: 500 AUTH not understood
2016-12-09 22:18:27 21283 1 Command: AUTH SSL
2016-12-09 22:18:27 21283 1 Response: 500 AUTH not understood
2016-12-09 22:18:27 21283 1 Status: Insecure server, it does not support FTP over TLS.
2016-12-09 22:18:27 21283 1 Command: USER madams
2016-12-09 22:18:27 21283 1 Response: 331 Password required for madams
2016-12-09 22:18:27 21283 1 Command: PASS ********
2016-12-09 22:18:27 21283 1 Response: 230 User madams logged in
2016-12-09 22:18:27 21283 1 Command: OPTS UTF8 ON
2016-12-09 22:18:27 21283 1 Response: 200 UTF8 set to on
2016-12-09 22:18:27 21283 1 Status: Logged in
2016-12-09 22:18:27 21283 1 Status: Retrieving directory listing...
2016-12-09 22:18:27 21283 1 Command: PWD
2016-12-09 22:18:27 21283 1 Response: 257 "/" is the current directory
2016-12-09 22:18:27 21283 1 Command: TYPE I
2016-12-09 22:18:27 21283 1 Response: 200 Type set to I
2016-12-09 22:18:27 21283 1 Command: PASV
2016-12-09 22:18:27 21283 1 Response: 227 Entering Passive Mode (64,130,94,10,240,63).
2016-12-09 22:18:27 21283 1 Command: LIST
2016-12-09 22:18:28 21283 1 Error: The data connection could not be established: ECONNREFUSED - Connection refused by server
2016-12-09 22:18:43 21283 1 Error: Connection timed out after 15 seconds of inactivity
2016-12-09 22:18:43 21283 1 Error: Failed to retrieve directory listing
2016-12-09 22:22:44 21283 1 Status: Disconnected from server


I've been over the network configuration guide. I am showing port 21 open. I have forwarded port 60000-65000 on my NAT router and in my firewall.

I've tried connecting to my server by domain name (adams-lan.org) and by the ip address returned by that domain name.

I am getting the same result on my desktop in Filezilla as well as when I run Filezilla on the server itself.

This happens in the command-line ftp clients I have used as well as Filzilla.

The network configuration wizard in Filezilla passes with no error:

Response: 200 Using port 63345, data token 1440906946
PORT 64,130,94,10,247,113
Response: 200 PORT command successful
LIST
Response: 150 opening data connection
Response: 200 Successful
QUIT
Response: 200 goodbye!
Connection closed
Test finished successfully

If I log directly into the server with a local user, I can connect to ftp and get a list with no problem.

If I log into my domain with a local user, it just hangs at: "150 Opening ASCII mode data connection for file list".

Using the lftp client, when I enter "ls" I see "waiting for response..." and then "connection refused". That's not all that helpful, but I can't find any log information from lftp.

Here is the journalctl info generated by a log in and attempted "ls" from lftp:


Dec 11 01:27:44 shuttle proftpd[3360]: PAM (proftpd) illegal module type: ~
Dec 11 01:27:44 shuttle proftpd[3360]: PAM (proftpd) no control flag supplied
Dec 11 01:27:44 shuttle proftpd[3360]: PAM (proftpd) no module name supplied
Dec 11 01:27:44 shuttle proftpd[3360]: pam_tcb(proftpd:auth): Authentication passed for madams from (uid=0)
Dec 11 01:27:44 shuttle proftpd[3360]: pam_tcb(proftpd:session): Session opened for madams by (uid=0)
Dec 11 01:27:44 shuttle proftpd[3360]: pam_env(proftpd:setcred): Unable to open config file: /etc/security/pam_env.conf: No such file or directory
Dec 11 01:27:44 shuttle proftpd[3360]: pam_tcb(proftpd:session): Session closed for madams


Given the information above, I'm sure there is something between the machine running proftpd and the Internet. I just don't know what it would be.


/var/log/proftpd/proftpd.log registers this:

2016-12-11 00:55:09,202 shuttle proftpd[32687] 192.168.1.105 (192.168.1.105[192.168.1.105]): FTP session opened.
2016-12-11 00:55:12,144 shuttle proftpd[32687] 192.168.1.105 (192.168.1.105[192.168.1.105]): USER madams: Login successful.
2016-12-11 00:55:18,172 shuttle proftpd[32687] 192.168.1.105 (192.168.1.105[192.168.1.105]): FTP session closed.
2016-12-11 00:55:24,444 shuttle proftpd[32713] 192.168.1.105 (192.168.1.1[192.168.1.1]): FTP session opened.
2016-12-11 00:55:27,397 shuttle proftpd[32713] 192.168.1.105 (192.168.1.1[192.168.1.1]): USER madams: Login successful.
2016-12-11 00:55:41,854 shuttle proftpd[32713] 192.168.1.105 (192.168.1.1[192.168.1.1]): notice: user madams: aborting transfer: Data connection closed
2016-12-11 00:55:41,854 shuttle proftpd[32713] 192.168.1.105 (192.168.1.1[192.168.1.1]): FTP session closed.

journalctl -xe shows:

Dec 11 01:02:09 shuttle proftpd[409]: pam_env(proftpd:setcred): Unable to open config file: /etc/security/pam_env.conf: No such file or directory
Dec 11 01:02:09 shuttle proftpd[409]: pam_tcb(proftpd:session): Session closed for madams

The file in question does exist:
-rw-r--r-- 1 root root 2972 Jul 1 2015 /etc/security/pam_env.conf

That file is also 100% commented out.

I've been working on this off and on for the last week. It's not getting any better. Any help appreciated on either or both of these issues.

Thank you.


--
Mark Adams

"READ CAREFULLY, by reading this email, you agree, on behalf of your employer,
to release me from all obligations and waivers arising from any and all
NON-NEGOTIATED agreements, licences, terms-of-service, shrinkwrap, clickwrap,
browsewrap, confidentiality, non-disclosure, non-compete and acceptable use
policies ("BOGUS AGREEMENTS") that I have entered into with your employer, its
partners, licensors, agents and assigns, in perpetuity, without prejudice to my
ongoing rights and privileges. You further represent that you have the authority
to release me from any BOGUS AGREEMENTS on behalf of your employer."



------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi



_______________________________________________
ProFTPD Users List <proftpd-***@proftpd.org><mailto:proftpd-***@proftpd.org>
Unsubscribe problems?
http://www.proftpd.org/list-unsub.html



--
Mark Adams

"READ CAREFULLY, by reading this email, you agree, on behalf of your employer,
to release me from all obligations and waivers arising from any and all
NON-NEGOTIATED agreements, licences, terms-of-service, shrinkwrap, clickwrap,
browsewrap, confidentiality, non-disclosure, non-compete and acceptable use
policies ("BOGUS AGREEMENTS") that I have entered into with your employer, its
partners, licensors, agents and assigns, in perpetuity, without prejudice to my
ongoing rights and privileges. You further represent that you have the authority
to release me from any BOGUS AGREEMENTS on behalf of your employer."
Loading...