Bug #3281

FTP - some virtual users can't login

Added by Filippo Carletti almost 6 years ago. Updated almost 6 years ago.

Status:CLOSEDStart date:
Priority:NormalDue date:
Assignee:-% Done:

100%

Category:nethserver-vsftpd
Target version:v6.7
Security class: Resolution:
Affected version:v6.6-final NEEDINFO:No

Description

Steps to reproduce:
  1. create ftp user mario
  2. access via ftp using mario credentials is ok
  3. create user luigi
  4. try to access via ftp using luigi
  5. access fails

Username above are important, because of alphabetical sort. Creating user donkey will work and user can login via ftp.

Associated revisions

Revision d664fed6
Added by Giacomo Sanchietti almost 6 years ago

nethserver-vsftpd-users: fix user creation. Refs #3281

History

#1 Updated by Filippo Carletti almost 6 years ago

  • Status changed from NEW to TRIAGED
  • % Done changed from 0 to 20

Virtual users are processed and appended to a tempfile.
Only the last user goes into the processed tempfile.

Possible fix:

--- /etc/e-smith/events/nethserver-vsftpd-save/S20nethserver-vsftpd-users 2015-09-14 12:12:45.000000000 0200
+
+ fixed 2015-10-09 12:49:57.548192142 +0200
@ -19,9 +19,9 @

my $tmp;
if ($usertype eq 'virtual') {
+ $tmp = new File::Temp( UNLINK => 1 );
for my $user ( $adb->get_all_by_prop( type => 'ftp' ) ) {
- $tmp = new File::Temp( UNLINK => 1 );

#2 Updated by Filippo Carletti almost 6 years ago

Useful commands:

db_dump -da /etc/vsftpd/ftpusers.db

#3 Updated by Giacomo Sanchietti almost 6 years ago

  • Status changed from TRIAGED to ON_DEV
  • Assignee set to Giacomo Sanchietti
  • % Done changed from 20 to 30

#4 Updated by Giacomo Sanchietti almost 6 years ago

  • Status changed from ON_DEV to MODIFIED
  • % Done changed from 30 to 60

Proposed patch has been merged.

#5 Updated by Giacomo Sanchietti almost 6 years ago

  • Status changed from MODIFIED to ON_QA
  • Assignee deleted (Giacomo Sanchietti)
  • % Done changed from 60 to 70
Package in nethserver-testing:
  • nethserver-vsftpd-1.0.4-1.1.gd664fed.ns6.noarch.rpm
Test case
  • Check the bus is not reproducbile

#6 Updated by dz0 0te almost 6 years ago

  • Assignee set to dz0 0te

#7 Updated by dz0 0te almost 6 years ago

  • Status changed from ON_QA to VERIFIED
  • Assignee deleted (dz0 0te)
  • % Done changed from 70 to 90

System and Package Version installed
VM KVM - Clean install of Nethserver 6.7 fully updated
Package Installed: nethserver-vsftpd-1.0.4-1.ns6.noarch
Other Package installed: FTP server,File server,Web server

Test Original Problem
1. created ftp user mario
2. access via ftp using mario credentials is ok
3. created user luigi
4. access via ftp using luigi, access failed

Install Updated Package

yum --enablerepo=nethserver-testing update nethserver-vsftpd-1.0.4-1.1.gd664fed.ns6

Test Results after update
Test case 1:
update package with users mario and luigi configured
mario access ok
luigi no access

to make user luigi work:
1. delete luigi
create user luigi
luigi access ok
mario access ok
or
2. disable luigi
enable luigi
luigi access ok
mario access ok

Test case 2:
update package with no users configured
users mario and luigi configured
mario access ok
luigi access ok

Verified or Reopen
Verified

Note
i don't know if this is the expected behavior from dev, when some users are already present.
but as the test case is to chek if the bug is not reproducible after update, i marked it as verified

#8 Updated by Filippo Carletti almost 6 years ago

i don't know if this is the expected behavior from dev, when some users are already present.

After update, simply creating a new user should fix access for everybody.

#9 Updated by dz0 0te almost 6 years ago

Filippo Carletti wrote:

i don't know if this is the expected behavior from dev, when some users are already present.

After update, simply creating a new user should fix access for everybody.

yes it works, sorry i didn't try it. Confirmed as verified

#10 Updated by Giacomo Sanchietti almost 6 years ago

  • Status changed from VERIFIED to CLOSED
  • % Done changed from 90 to 100
Released in nethserver-updates:
  • nethserver-vsftpd-1.0.5-1.ns6.noarch.rpm

Also available in: Atom PDF