Bug 855471

Summary: The vsftp server created by yast ftp module is non-functional in xinetd mode.
Product: [openSUSE] openSUSE 13.1 Reporter: Carlos Robinson <carlos.e.r>
Component: YaST2Assignee: Michal Filka <mfilka>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Major    
Priority: P5 - None CC: jcejka, jrd, rde2
Version: Final   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: Requested yast logs

Description Carlos Robinson 2013-12-13 21:47:25 UTC
The vsftp server created by yast ftp module is non-functional in xinetd mode.

Creating a default FTP vsftp server from the yast module for creating an ftp server, xinet mode, fails (all settings defaults). When a client tries to connect, he gets:

cer@Telcontar:~> ftp 192.168.74.119
Connected to 192.168.74.119.
500 OOPS: could not bind listening IPv4 socket
ftp>

The problem is that the config file needs:

listen=NO

The config file does not have that variable, the default seems to be "yes", which is what is needed in daemon mode, not on xinet mode.

This bug affects also 12.3. I did not report when I found out thinking that 13.1 corrected it.


Bug classified as major, because the FTP server is unusable as created. Even "Critical"


y2logs saved and available if requested.
Comment 1 Vladimir Moravec 2013-12-17 16:35:54 UTC
Hi, please attach the logs. 
Btw, is the vsftpd service running? I tried to reproduce that and ended up with  the same failure you described above. I checked `systemctl status vsftpd` and got error about failed service.
Comment 2 Carlos Robinson 2013-12-17 18:04:23 UTC
Created attachment 572229 [details]
Requested yast logs

In xinet mode, the service does not run. Instead, xinetd starts the daemon when there is a connection attempts; after if finishes, the daemon exits. It makes sense when connections are few.
Comment 3 Joe Doupnik 2014-04-03 11:53:21 UTC
As Carlos notes above, we must now explicitly set listen=NO for xinetd.d mode. That is supposed to be the default, and it has worked that way for years.
I traced the current need back to the original source code, file tunable.c, line 183, which reads tunable_listen = 1  in the current v 3.0.2 tar ball. 1 means YES.
We might also note that line 190 reads tunable_listen_ipv6 = 0.

A suggestion is patch the line tuneable_listen = 1 to use = 0  as it used to be in the past (which is v2.0.7 in SLES 11 SP3). That would make behaviour match the other defaults in vsftpd.conf and allow copying vsftpd.conf from previous servers to continue working as expected.
Joe D.
Comment 4 Gert Redlich 2014-05-12 20:02:36 UTC
I did install opensuse 13.1 at "may 11. 2014" with all updates and patches and everthing what is done during automatic installation.
What a luck, it is a VM/guest under XEN.

And now installing vsftp 3.0.2-10.1.2 with yast, (where a bug is known since end of year 2013), I did not expect this bug - so configuring vsftp.conf as usally like years (since 1998)
and ..... afte rfist ftp login (the login-try only)

The server hangs - pls notice, not the ftp server hangs, - no - the full virtual machine hangs / was killed - absolutely crazy - the ipv6 network is initially set inactive.

I will give it a last try - however, as written up there, may be it does not work - I am running ipv4 only.
I am documenting all these events here (in German language) :
http://software.rde.de/opensuse-131-auf-dl385-g2-1.html

Gert from RDE /Germany
Comment 5 Gert Redlich 2014-05-12 20:12:39 UTC
may 12. 2014 at late evening

I did modyfy the vsftp.conf as suggested:

#
# When "listen" directive is enabled, vsftpd runs in standalone mode and
# listens on IPv4 sockets. This directive cannot be used in conjunction
# with the listen_ipv6 directive.

listen=YES

#
# This directive enables listening on IPv6 sockets. To listen on IPv4 and IPv6
# sockets, you must run two copies of vsftpd with two configuration files.
# Make sure, that one of the listen options is commented !!

listen_ipv6=NO

#
ok, it seems to work, currently my upload is denied., I must look and fix

gert
Comment 6 Gert Redlich 2014-05-12 20:44:21 UTC
oh sorry, not successful, beginning 1. transfer, the server crashes completely. only hard reset by remote administration with "ilO2" works - what a luck working on HP servers

result, the hint does not work at all - i cannot get any ftp session running-
and ftp on opensuse 12.1 and 12.2 is working fine.

= very bad news with 13.1
Comment 7 Tomáš Chvátal 2015-01-14 13:54:37 UTC
This should be fixed in 13.2, at least we were fixing it for SLE12 so it should be. Please recheck it.
Comment 8 Josef Cejka 2017-08-11 12:10:03 UTC
Thank you for reporting your issue. After review it was determined this bug is no longer present/affecting current releases (openSUSE Leap 42.3 , openSUSE Leap 42.2, or openSUSE Tumbleweed).
Do not hesitate to open a new report if you can still somehow reproduce the problem describing exact steps how to achieve it.