Description of problem: on mageia 7, with vsftpd, the dir|ls command fails and kill the connection to the server other commands like put/get are still working ps : the problem does not exists on mageia 6 Version-Release number of selected component (if applicable): vsftpd-3.0.3-7.mga7.src.rpm How reproducible: Steps to Reproduce: 1. urpmi vsftpd 2. systemctl start vsftpd.service 3. ftp localhost 4. try a 'dir' command the result is ftp> dir 227 Entering Passive Mode (127,0,0,1,187,111). 150 Here comes the directory listing. 500 OOPS: 421 Service not available, remote server has closed connection the problem seems to be general : I found it on archlinux : https://bugs.archlinux.org/task/62889
the dir command works only if I add "seccomp_sandbox=NO" in /etc/vsftpd/vsftpd.conf
I'll check this one.
Assignee: bugsquad => jani.valimaaCC: (none) => jani.valimaa
Added a patch to allow getdents64 syscalls. Pushed vsftpd-3.0.3-7.1.mga7 to core/updates_testing for mga7. Please test.
Assignee: jani.valimaa => qa-bugs
it is better but not enough : if I try on anonymous ftp, it works if I try on my account, I have still the same error gerbier@lxcti1 ~ $ rpm -q vsftpd vsftpd-3.0.3-7.1.mga7 gerbier@lxcti1 ~ $ ftp localhost Connected to localhost. 220 (vsFTPd 3.0.3) 530 Please login with USER and PASS. Name (localhost:gerbier): ftp 331 Please specify the password. Password: 230 Login successful. Remote system type is UNIX. Using binary mode to transfer files. ftp> ls 227 Entering Passive Mode (127,0,0,1,95,122). 150 Here comes the directory listing. dr-xr-sr-x 2 983 977 4096 Jul 11 16:28 pub 226 Directory send OK. ftp> quit 221 Goodbye. gerbier@lxcti1 ~ $ ftp localhost Connected to localhost. 220 (vsFTPd 3.0.3) 530 Please login with USER and PASS. Name (localhost:gerbier): 331 Please specify the password. Password: 230 Login successful. Remote system type is UNIX. Using binary mode to transfer files. ftp> ls 227 Entering Passive Mode (127,0,0,1,49,10). 150 Here comes the directory listing. 500 OOPS: 421 Service not available, remote server has closed connection if I run strace -ff on vsftpd process, I got an SIGSYS error : ... lstat("SPIP-v3.1.9.zip", {st_mode=S_IFREG|0644, st_size=10368268, ...}) = 0 lstat("vpnc.patch", {st_mode=S_IFREG|0644, st_size=423, ...}) = 0 lstat("projets", {st_mode=S_IFLNK|0777, st_size=28, ...}) = 0 readlink("projets", "/sauvegarde/gerbier/projets/", 4095) = 28 lstat("alert_search.json", {st_mode=S_IFREG|0644, st_size=722, ...}) = 0 lstat("menu_auto2.php.dmz2", {st_mode=S_IFREG|0755, st_size=4113, ...}) = 0 lstat("unison.log", {st_mode=S_IFREG|0600, st_size=10757, ...}) = 0 lstat("rpmreaper-0.2.0-19.mga7.x86_64.rpm", {st_mode=S_IFREG|0644, st_size=48764, ...}) = 0 lstat("config", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("wab", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("test_fs.sh", {st_mode=S_IFREG|0750, st_size=702, ...}) = 0 getdents64(4, /* 0 entries */, 32768) = 0 sysinfo( <unfinished ...>) = ? +++ killed by SIGSYS +++
OK, I'll check if there are other getdents calls to fix.
Did some testing and I don't have issues with a local user after updating. $ rpm -qa vsftpd vsftpd-3.0.3-7.1.mga7 $ ftp localhost Connected to localhost. 220 (vsFTPd 3.0.3) 530 Please login with USER and PASS. Name (localhost:wally): 331 Please specify the password. Password: 230 Login successful. Remote system type is UNIX. Using binary mode to transfer files. ftp> dir 227 Entering Passive Mode (127,0,0,1,88,92). 150 Here comes the directory listing. drwxr-xr-x 2 1000 1000 4096 Jun 16 07:24 Desktop drwxr-xr-x 2 1000 1000 4096 Jun 16 07:24 Documents drwxr-xr-x 2 1000 1000 4096 Jun 16 07:24 Downloads drwxr-xr-x 2 1000 1000 4096 Jun 16 07:24 Music drwxr-xr-x 2 1000 1000 4096 Jun 16 07:24 Pictures drwxr-xr-x 2 1000 1000 4096 Jun 16 07:24 Templates drwxr-xr-x 2 1000 1000 4096 Jun 16 07:24 Videos drwx------ 2 1000 1000 4096 Sep 18 2018 tmp 226 Directory send OK.
I had some more tests with vsftpd-3.0.3-7.1.mga7 on several computers. I have still the same problem on main computer (without tomoyo/selinux/apparmor) but it works on another computer : I will have to search what are the differences !
it seems to be a problem with the number of files in the target directory I have tested, by adding files, one by one, and the dir command works (for me) with 31 or less files; with 32 (or more) files, the dir command does not work.
MGA7-64 Plasma on Lenovo B50 No installation issues. Hm, just installing the update, start it from MCC, check on CLI: # systemctl -l status vsftpd ● vsftpd.service - Vsftpd ftp daemon Loaded: loaded (/usr/lib/systemd/system/vsftpd.service; disabled; vendor preset: disabled) Active: active (running) since Tue 2019-09-17 10:14:39 CEST; 10min ago Main PID: 5586 (vsftpd) Memory: 1.6M CGroup: /system.slice/vsftpd.service └─5586 /usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf sep 17 10:14:39 mach5.hviaene.thuis systemd[1]: Starting Vsftpd ftp daemon... sep 17 10:14:39 mach5.hviaene.thuis systemd[1]: Started Vsftpd ftp daemon. Then $ ftp localhost Connected to localhost. 220 (vsFTPd 3.0.3) 530 Please login with USER and PASS. Name (localhost:tester7): 530 This FTP server is anonymous only. Login failed. ftp> I'll have to do some research on ftp, but I feel the defaults on localhost should work.
CC: (none) => herman.viaene
OK, I had to add userlist_deny=NO to /etc/vsftpd/vsftpd.conf and put my username in /etc/vsftpd/user_list then $ ftp localhost Connected to localhost. 220 (vsFTPd 3.0.3) 530 Please login with USER and PASS. Name (localhost:tester7): 331 Please specify the password. Password: 230 Login successful. Remote system type is UNIX. Using binary mode to transfer files. ftp> pwd 257 "/home/tester7" is the current directory ftp> dir 227 Entering Passive Mode (127,0,0,1,119,30). 150 Here comes the directory listing. drwxr-xr-x 2 1000 1000 4096 Sep 01 19:44 Afbeeldingen drwxrwxr-x 2 1000 1000 4096 Sep 14 09:22 Desktop drwxr-xr-x 4 1000 1000 4096 Sep 15 09:31 Documenten drwxr-xr-x 2 1000 1000 4096 Sep 15 08:07 Downloads drwxr-xr-x 2 1000 1000 4096 Jul 13 10:12 Muziek drwxr-xr-x 2 1000 1000 4096 Jul 13 10:12 Sjablonen drwxr-xr-x 2 1000 1000 4096 Jul 13 10:12 Video's drwxrwxr-x 2 1000 1000 4096 Sep 14 09:15 test drwx------ 2 1000 1000 4096 Sep 18 2018 tmp 226 Directory send OK. ftp> cd cd Documenten 550 Failed to change directory. ftp> cd Documenten 250 Directory successfully changed. ftp> dir 227 Entering Passive Mode (127,0,0,1,244,78). 150 Here comes the directory listing. 500 OOPS: 421 Service not available, remote server has closed connection There are 2 subfolders and 66 files in the Documenten folder.
Connected to localhost. 220 (vsFTPd 3.0.3) 250 Directory successfully changed. ftp> dir 227 Entering Passive Mode (127,0,0,1,176,118). 150 Here comes the directory listing. 500 OOPS: 421 Service not available, remote server has closed connection -------- This failed
CC: (none) => brtians1
Keywords: (none) => feedback
Reassigning to packagers as the update seems not ready for QA.
CC: (none) => brunoAssignee: qa-bugs => bugsquad
@eric : thanks for your testing, esp comment 8. @Jani : thanks for your input. Also Herman & Brian for tests. (In reply to Rémi Verschelde from comment #13) > Reassigning to packagers as the update seems not ready for QA. Assigning globally; but Jani is CC'd as he has already looked at this. Registered maintainer is Bruno, already CC'd above.
Assignee: bugsquad => pkg-bugsKeywords: feedback => (none)
Added patch from Arch to fix the issue to list > 31 items in a dir. Added also a patch originally from Fedora to disable anonymous access by default. Please test vsftpd-3.0.3-7.2.mga7 from core/updates_testing.
Assignee: pkg-bugs => qa-bugs
I can confirm : on my tests, the problem is fixed with vsftpd-3.0.3-7.2 thanks !!
MGA7-64 Plasma on Lenovo B50 No installation issues With default installation: # systemctl -l start vsftpd # systemctl -l status vsftpd ● vsftpd.service - Vsftpd ftp daemon Loaded: loaded (/usr/lib/systemd/system/vsftpd.service; disabled; vendor preset: disabled) Active: active (running) since Mon 2020-01-06 15:36:55 CET; 3s ago Process: 9332 ExecStart=/usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf (code=exited, status=0/SUCCESS) Main PID: 9333 (vsftpd) Memory: 496.0K CGroup: /system.slice/vsftpd.service └─9333 /usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf jan 06 15:36:55 mach5.hviaene.thuis systemd[1]: Starting Vsftpd ftp daemon... jan 06 15:36:55 mach5.hviaene.thuis systemd[1]: Started Vsftpd ftp daemon. and then $ ftp localhost Connected to localhost. 500 OOPS: vsftpd: both local and anonymous access disabled! ftp> quit So made the changes in /etc/vsftpd/ as described in Comment 10 and then # systemctl -l restart vsftpd Job for vsftpd.service failed because the control process exited with error code. See "systemctl status vsftpd.service" and "journalctl -xe" for details. [root@mach5 ~]# systemctl -l status vsftpd ● vsftpd.service - Vsftpd ftp daemon Loaded: loaded (/usr/lib/systemd/system/vsftpd.service; disabled; vendor preset: disabled) Active: failed (Result: exit-code) since Mon 2020-01-06 15:40:09 CET; 13s ago Process: 15961 ExecStart=/usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf (code=exited, status=2) jan 06 15:40:09 mach5.hviaene.thuis systemd[1]: vsftpd.service: Succeeded. jan 06 15:40:09 mach5.hviaene.thuis systemd[1]: Stopped Vsftpd ftp daemon. jan 06 15:40:09 mach5.hviaene.thuis systemd[1]: Starting Vsftpd ftp daemon... jan 06 15:40:09 mach5.hviaene.thuis systemd[1]: vsftpd.service: Control process exited, code=exited, status=2/INVALIDARGUMENT jan 06 15:40:09 mach5.hviaene.thuis systemd[1]: vsftpd.service: Failed with result 'exit-code'. jan 06 15:40:09 mach5.hviaene.thuis systemd[1]: Failed to start Vsftpd ftp daemon. journal -xe mentions INVALIDARGUMENT
I installed it on a fresh hardware build. It worked for me. Jan 08 21:32:02 linux.local [RPM][6409]: install vsftpd-3.0.3-7.2.mga7.x86_64: success root 9759 1 0 21:50 ? 00:00:00 /usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf I was able to move a few hundred files and query a directory with over a hundred through filezilla. Seems to work for me now. Herman - can I approve this from this test?
@ Brian Well, I'm a bit frustrated because you do not mention whether you made any changes in the conf files. Anyway, I commented out the changes I made, and instead uncommented the line local_enable=YES in the /etc/vsftpd/vsftpd.conf file. That allowed me to have the vsftpd to run OK and $ ftp localhost Connected to localhost. 220 (vsFTPd 3.0.3) 530 Please login with USER and PASS. Name (localhost:tester7): 331 Please specify the password. Password: 230 Login successful. Remote system type is UNIX. Using binary mode to transfer files. ftp> dir 227 Entering Passive Mode (127,0,0,1,160,170). 150 Here comes the directory listing. drwxr-xr-x 3 1000 1000 4096 Jan 03 13:51 Afbeeldingen drwxrwxr-x 2 1000 1000 4096 Jan 02 13:49 Desktop drwxr-xr-x 3 1000 1000 4096 Jan 07 09:28 Documenten drwxr-xr-x 3 1000 1000 4096 Jan 06 13:29 Downloads drwxr-xr-x 2 1000 1000 4096 Dec 28 10:01 Muziek drwxr-xr-x 2 1000 1000 4096 Dec 28 10:01 Sjablonen drwxr-xr-x 2 1000 1000 4096 Dec 28 10:01 Video's drwx------ 2 1000 1000 4096 Sep 18 2018 tmp 226 Directory send OK. So, OK for both of us.
Whiteboard: (none) => MGA7-64-OK
My apologies Herman - yes uncommented that line and also the allow-write line. Again my apologies.
Keywords: (none) => advisory, validated_updateCC: (none) => tmb, sysadmin-bugs
An update for this issue has been pushed to the Mageia Updates repository. https://advisories.mageia.org/MGAA-2020-0015.html
Status: NEW => RESOLVEDResolution: (none) => FIXED