LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-04-2009, 10:49 AM   #16
stamcose
Member
 
Registered: Nov 2009
Posts: 54

Original Poster
Rep: Reputation: 15

Where would you expect these messages to show up?

A failed ftp attempt:

connected to 192.168.0.145
Connection closed by remote host

Generates:

No errors messages to sysout/syserror i.e. to the screen
No error messages to /var/log/messages

I did not find (easily) any other potential log file that could be expected to be associated with pure-ftp!
 
Old 12-04-2009, 11:31 AM   #17
stamcose
Member
 
Registered: Nov 2009
Posts: 54

Original Poster
Rep: Reputation: 15
I stopped xinetd:
service xinetd stop

and started pure-ftp from the screen with line command:
/usr/sbin/pure-ftpd -d

An unsuccessful ftp attempt:
ftp 192.168.0.145

Connected to 192.168.0.145
...
Connection closed by remote host

did not generate any error messagage, neither to the screen nor to

/var/log/messages

Where do you expect error messages to appear?
 
Old 12-04-2009, 11:49 AM   #18
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
SuSE has a yast2 inetd module that you can use it to graphically enable or disable services.

example for kde: kdesu yast2 inetd
or for
gnome: gnomesu yast2 inetd
Then it starts, you can enable xinetd it is isn't running, and then select the "ftp" line and click on the "Toggle Status" button if it isn't enabled.

You can also enable it using chkconfig as root. Sending the SIGHUP signal causes xinetd to reread all of the config files in /etc/xinetd.d/. You can run "tail -f /var/log/messages" to see if any services were changed.
ex:
chkconfig pure-ftp on

killall -SIGHUP xinetd

Last edited by jschiwal; 12-04-2009 at 12:09 PM.
 
Old 12-04-2009, 03:24 PM   #19
stamcose
Member
 
Registered: Nov 2009
Posts: 54

Original Poster
Rep: Reputation: 15
Read my first post on page 1. This has all been done and been done correctly. The problem is that YAST/SUSE repository is not correctly set up at this time. Anybody is invited to try, it is not correctly set up!
 
Old 12-04-2009, 03:51 PM   #20
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
I had installed it from the repo before posting my response, and it is working. Disconnecting after 15 minutes of inactivity is normal.

If you are using xinetd, then use the /etc/xinetd.d/pure-ftp file for arguments instead of /etc/pure-ftp/pure-ftp.conf.

Look at the comments of the xinetd.d/pure-ftp config file:
Code:
# default: off
# description: The ftpd server serves FTP connections. It uses normal, \
#       unencrypted usernames and passwords for authentication. This ftpd is \
#       the pure-ftpd.
#    ** NOTE ** when using pure-ftpd from xinetd the arguments to control
#               it's behaviour should be added here in this file in the
#               "server_args" line since the configuration file
#               /etc/pure-ftpd.conf is only for standalone pure-ftpd.
#               The command "/usr/sbin/pure-config-args /etc/pure-ftpd.conf"
#               will print the arguments needed for behaviour like standalone
Code:
Here are the default settings as server_args arguments
/usr/sbin/pure-config-args /etc/pure-ftpd/pure-ftpd.conf && echo
-A -c10 -B -C3 -z -D -e -fftp -H -I15 -lpam -L2000:8 -m4 -s -U177:077 -u40 -x -r -i -k99 -G -Z -p30000:30100
Make sure you haven't enabled both the standalone and xinetd services and adjust the arguments for using xinetd. E.G. you don't want the -B option since that is xinetd's job.

You could instead run it as a standalone service. In this case use chkconfig to enable it for certain run levels. You can then start,stop,restore, etc the service with the /usr/sbin/rcpure-ftpd script.

The max idle time is the -I option, which you can change. in the server arguments.

Last edited by jschiwal; 12-04-2009 at 04:06 PM.
 
Old 12-04-2009, 04:38 PM   #21
stamcose
Member
 
Registered: Nov 2009
Posts: 54

Original Poster
Rep: Reputation: 15
I have changed absolutely nothing in any configuration file, they are exactly as collected with YAST ("get software")from the repository. I have used the interactive YAST xinetd facility to toggle the ftp service (version pure-ftp) on.
 
Old 12-04-2009, 08:54 PM   #22
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
You will need to configure your ftp server to what suit your needs. The pure_ftp.conf file contains a web address to the full documentation. There are a number of man pages supplied with the package as well. The xinetd.d/pure_ftp file also contains important information in its comments. Be sure to read them. The defaults are very restrictive, and allow only anonymous downloading.

You can restart xinetd in openSuSE with "sudo /usr/sbin/rcxinetd restart". Make sure the firewall doesn't block the port. Then try logging in from another computer. If there is a problem, look in /var/log/messages.

Good Luck.
 
Old 12-05-2009, 03:45 AM   #23
stamcose
Member
 
Registered: Nov 2009
Posts: 54

Original Poster
Rep: Reputation: 15
Sure, a tailoring of the setup could/should be considered when a working configuration has been reached. But I am not there at all! I get
"connection closed by remote host" without having got a prompt for login!
Neither as "anonymous" or as anything else.

A year ago I did exactly the same on another computer on which SUSE linux had just been installed from scratch. Then it worked!

Now I have another computer with SUSE linux just installed from precisely the same live CD
 
Old 12-05-2009, 05:27 AM   #24
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
Double check that you don't have the standalone running as well as. Check the kernel messages on the server. It will mention that the port is already being used in this case.
Code:
ec  5 03:49:31 qosmio pure-ftpd: (?@192.168.1.105) [INFO] New connection from 192.168.1.105                                                                     
Dec  5 03:49:37 qosmio pure-ftpd: pam_env(pure-ftpd:setcred): non-alphanumeric key 'alias aumix=padsp aumix' in /etc/environment', ignoring                      
Dec  5 03:49:37 qosmio pure-ftpd: pam_env(pure-ftpd:setcred): non-alphanumeric key 'alias sox=padsp sox' in /etc/environment', ignoring                          
Dec  5 03:49:37 qosmio pure-ftpd: pam_env(pure-ftpd:setcred): non-alphanumeric key 'alias timidity=timidity -Oe' in /etc/environment', ignoring                  
Dec  5 03:49:37 qosmio pure-ftpd: (?@192.168.1.105) [INFO] jschiwal is now logged in                                                                             
Dec  5 03:49:51 qosmio pure-ftpd: (jschiwal@192.168.1.105) [INFO] Logout.                                                                                        
Dec  5 03:50:13 qosmio pure-ftpd: (?@192.168.1.105) [INFO] New connection from 192.168.1.105                                                                     
Dec  5 03:50:17 qosmio pure-ftpd: pam_listfile(pure-ftpd:auth): Refused user root for service pure-ftpd                                                          
Dec  5 03:50:20 qosmio pure-ftpd: (?@192.168.1.105) [WARNING] Authentication failed for user
Run "netstat --tcp --listening --programs". Do you see ftp listed[code]
Code:
sudo netstat --tcp  --listening --programs | sed -n '2p;/ftp/p'
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 *:ftp                   *:*                     LISTEN      22539/xinetd
Check your firewall settings:
Run "sudo /usr/sbin/iptables -L input_int | grep ftp"
Code:
sudo /usr/sbin/iptables -L input_int | grep ftp
LOG        tcp  --  anywhere             anywhere            limit: avg 3/min burst 5 tcp dpt:ftp flags:FIN,SYN,RST,ACK/SYN LOG level warning tcp-options ip-options prefix `SFW2-INint-ACC-TCP '
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:ftp
 
Old 12-05-2009, 07:24 AM   #25
stamcose
Member
 
Registered: Nov 2009
Posts: 54

Original Poster
Rep: Reputation: 15
1)
To which file are those "kernel messages" going?

2)
Code:
linux-vl1l:/home/mats # sudo netstat --tcp  --listening --programs | sed -n '2p;/ftp/p'
Proto Recv-Q Send-Q Local Address           Foreign Address         State  PID/Program name
tcp        0      0 *:ftp                   *:*                     LISTEN  2360/xinetd
3)
Code:
linux-vl1l:/home/mats # sudo /usr/sbin/iptables -L input_int | grep ftp
iptables: No chain/target/match by that name
I do not find any documentation/manual page for "/usr/sbin/iptables" but it seems that the reply "No chain/target/match" (on sys-error!) having set the parameter "-L" to "input_int" points to an incorrect setup of the firewall!
 
Old 12-05-2009, 10:01 AM   #26
stamcose
Member
 
Registered: Nov 2009
Posts: 54

Original Poster
Rep: Reputation: 15
I guess this is the way to list the firewall settings:

Code:
/usr/sbin/iptables -L
Chain INPUT (policy DROP)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere            state ESTABLISHED
ACCEPT     icmp --  anywhere             anywhere            state RELATED
input_ext  all  --  anywhere             anywhere
input_ext  all  --  anywhere             anywhere
LOG        all  --  anywhere             anywhere            limit: avg 3/min burst 5 LOG level warning tcp-options ip-options prefix `SFW2-IN-ILL-TARGET '
DROP       all  --  anywhere             anywhere

Chain FORWARD (policy DROP)
target     prot opt source               destination
LOG        all  --  anywhere             anywhere            limit: avg 3/min burst 5 LOG level warning tcp-options ip-options prefix `SFW2-FWD-ILL-ROUTING '

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere            state NEW,RELATED,ESTABLISHED
LOG        all  --  anywhere             anywhere            limit: avg 3/min burst 5 LOG level warning tcp-options ip-options prefix `SFW2-OUT-ERROR '

Chain forward_ext (0 references)
target     prot opt source               destination

Chain input_ext (2 references)
target     prot opt source               destination
DROP       all  --  anywhere             anywhere            PKTTYPE = broadcast
ACCEPT     icmp --  anywhere             anywhere            icmp source-quench
ACCEPT     icmp --  anywhere             anywhere            icmp echo-request
LOG        all  --  anywhere             anywhere            limit: avg 3/min burst 5 PKTTYPE = multicast LOG level warning tcp-options ip-options prefix `SFW2-INext-DROP-DEFLT '
DROP       all  --  anywhere             anywhere            PKTTYPE = multicast
LOG        tcp  --  anywhere             anywhere            limit: avg 3/min burst 5 tcp flags:FIN,SYN,RST,ACK/SYN LOG level warning tcp-options ip-options prefix `SFW2-INext-DROP-DEFLT '
LOG        icmp --  anywhere             anywhere            limit: avg 3/min burst 5 LOG level warning tcp-options ip-options prefix `SFW2-INext-DROP-DEFLT '
LOG        udp  --  anywhere             anywhere            limit: avg 3/min burst 5 LOG level warning tcp-options ip-options prefix `SFW2-INext-DROP-DEFLT '
LOG        all  --  anywhere             anywhere            limit: avg 3/min burst 5 state INVALID LOG level warning tcp-options ip-options prefix`SFW2-INext-DROP-DEFLT-INV '
DROP       all  --  anywhere             anywhere

Chain reject_func (0 references)
target     prot opt source               destination
REJECT     tcp  --  anywhere             anywhere            reject-with tcp-reset
REJECT     udp  --  anywhere             anywhere            reject-with icmp-port-unreachable
REJECT     all  --  anywhere             anywhere            reject-with icmp-proto-unreachable
These are the original settings from the installation CD. It is then wrongly set to disallow ftp????
 
Old 12-05-2009, 05:58 PM   #27
stamcose
Member
 
Registered: Nov 2009
Posts: 54

Original Poster
Rep: Reputation: 15
Actually, a failed ftp access attempt leaves a trace in

/var/log/firewall

Code:
Dec  5 23:27:41 linux-vl1l kernel: SFW2-INext-DROP-DEFLT IN=eth0 OUT= MAC=00:30:05:d2:a4:75:00:19:d2:7c:b2:53:08:00 SRC=192.168.0.133 DST=192.168.0.145 LEN=48 TOS=0x00 PREC=0x00 TTL=128 ID=524 DF PROTO=TCP SPT=1059 DPT=21 WINDOW=64512 RES=0x00 SYN URGP=0 OPT (020405B401010402) 
Dec  5 23:27:44 linux-vl1l kernel: SFW2-INext-DROP-DEFLT IN=eth0 OUT= MAC=00:30:05:d2:a4:75:00:19:d2:7c:b2:53:08:00 SRC=192.168.0.133 DST=192.168.0.145 LEN=48 TOS=0x00 PREC=0x00 TTL=128 ID=534 DF PROTO=TCP SPT=1059 DPT=21 WINDOW=64512 RES=0x00 SYN URGP=0 OPT (020405B401010402) 
Dec  5 23:27:51 linux-vl1l kernel: SFW2-INext-DROP-DEFLT IN=eth0 OUT= MAC=00:30:05:d2:a4:75:00:19:d2:7c:b2:53:08:00 SRC=192.168.0.133 DST=192.168.0.145 LEN=48 TOS=0x00 PREC=0x00 TTL=128 ID=549 DF PROTO=TCP SPT=1059 DPT=21 WINDOW=64512 RES=0x00 SYN URGP=0 OPT (020405B401010402)
192.168.0.133 is the client and 192.168.0.145 is the host.

How should this be interpreted? Is the firewall letting the message through to xinetd/pure-ftp?. No other file in /var/log is modified by such a failed attempt!

There are 3 identical lines covering a waiting time of about 10 seconds, what about corresponds to the time duration up to the message "connection closed by the remote host". I guess the client makes 3 attempts in this time!

/var/log/xinetd.log

is empty!!!

Does this not imply that the message never reached xinetd but got stopped in the firewall? What trace does a an ftp connection in a functioning system leave in the /var/log/xinetd.log?
 
Old 12-05-2009, 07:21 PM   #28
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
The main kernel log is /var/log/messages. You don't have the interface for the internal side blocking any ports. That is why there is no input_int chain. Check which zone that eth0 is assigned to. If it is external, then you don't have the port open.

The /var/log/messages line you posted were caused by a line with the LOG target. I don't know what "tcp-options ip-options prefix `SFW2-INext-DROP-DEFLT" does however.

My /var/log/xinetd.log does have lines for ftp
Code:
09/12/4@14:56:32: START: ftp from=192.168.1.105
09/12/4@14:56:32: EXIT: ftp status=0 duration=0(sec)
09/12/4@14:59:21: EXIT: ftp status=249 duration=906(sec)
09/12/4@14:59:46: START: ftp from=192.168.1.105
09/12/4@15:00:32: EXIT: ftp status=0 duration=46(sec)
However it doesn't contain initial connection information (e.g. authentication).
 
Old 12-06-2009, 03:52 AM   #29
stamcose
Member
 
Registered: Nov 2009
Posts: 54

Original Poster
Rep: Reputation: 15
The three lines of my last post was (as I wrote) from

/var/log/firewall

not

/var/log/messages

In the latter log absolutely no trace of ftp activity!

If you make the line command

/usr/sbin/iptables -L

do you get the same output as the one displayed in my post from yesterday 16:01?

Maybe somebody in SUSE has messed up the firewall settings!

But the installation CD was used one year ago resulting in a correct system!

Maybe YAST nowadays messes up the firewall when it implements an ftp daemon to run under xinetd!

Can the firewall be completely switched off? Rather pointless troublemaker in a LAN behind a router with a firewall towards Internet!
 
Old 12-06-2009, 08:53 AM   #30
stamcose
Member
 
Registered: Nov 2009
Posts: 54

Original Poster
Rep: Reputation: 15
You write:

Quote:
Check which zone that eth0 is assigned to. If it is external, then you don't have the port open.
How is this done? How to check? How to assign it as should be?
 
  


Reply

Tags
pureftpd


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Will adding nvidia repository in suse 11.1 enable yast driver download? sirius57 SUSE / openSUSE 2 04-08-2009 08:43 PM
SUSE 9.1 Yast repository issues liquidengineer1981 Linux - Software 3 03-06-2009 01:19 PM
pure-ftpd-mysql activates pure-ftpd zvikamer Linux - Software 2 03-01-2008 01:11 PM
creation of own http repository for Suse yast sawoy SUSE / openSUSE 1 06-20-2005 05:58 AM
authentication & file sharing using pure-ftpd & suse 9.0 dopper Linux - Software 1 08-13-2004 12:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration