Vesta: FTP 530 login incorrect on 'Upgraded' VestaCP v18

Created on 10 Jan 2018  路  17Comments  路  Source: serghey-rodin/vesta

Operating System (OS/VERSION):

Debian 8.x

VestaCP Version:

Type here, e.g. v0.9.8 release 18

Installed Software (what you got with the installer):

Type here, e.g. Apache + Nginx

Steps to Reproduce:

on a VestaCP that is upgraded from v17 to v18, after creating an FTP user for a domain, you can't login and it will throw FTP 530 login incorrect.

How I fixed:

I checked /etc/passwd and I saw that there is an additional _/usr_ in front of _/sbin/nologin_ which was causing it.
Removing the _/usr_ fixes the ftp login.

vestausr_ftpusr:x:1009:1009::/home/vestausr/web/domain.com/public_html:/usr/sbin/nologin
be changed to
vestausr_ftpusr:x:1009:1009::/home/vestausr/web/domain.com/public_html:/sbin/nologin

No problem on Debian 9

Note: Works fine on Debian 9, both with upgraded or fresh VestaCP with /usr/sbin/nologin for the user in /etc/passwd. The bug is only problem on Debian 8

Can the Devs please take a look into this and confirm if this is a big indeed ?

Most helpful comment

In SSH, as root, execute:
echo "/usr/sbin/nologin" >> /etc/shells
It should solve your problem.

All 17 comments

In SSH, as root, execute:
echo "/usr/sbin/nologin" >> /etc/shells
It should solve your problem.

@dpeca This answer is wrong. Doing this, opens up FTP connections for any credentials, so it seems!

"/usr/sbin/nologin" is added to /etc/shells in every VestaCP installation in last two years...
So...
Make conclusion yourself.

Huh, but then how come that this single addition opens up FTP access for any credentials in my setup? Installed Vesta also ~2yrs ago, nothing changed in permissions / FTP services.

Something other is wrong there.
Check /etc/shadow, maybe that account does not have password, or FTP daemon is somehow configured to allow anonymous login.

Facing this same problem with VestaCP on CentOS 7.5 ... none of the above solutions working good for me. Any help for CentOS 7.x?

Try to follow this tip:

In SSH, as root, execute:
echo "/usr/sbin/nologin" >> /etc/shells
It should solve your problem.

/usr/sbin/nologin was already there; I checked the passwds and added /sbin/nologin to /etc/shells ... this solved my problem.

Yes, @ruturaaj adding/sbin/nologin solved the issue and /usr/sbin/nologin was already there.
So @dpeca you should commit this to be added during installation too (/sbin/nologin to /etc/shells).
Because I just installed Vesta and updated with files from GitHub, on Centos 7 64 bit latest version. And I had this issue.

In fresh installation of CentOS 7.5 and last VestaCP this: echo "/usr/sbin/nologin" >> /etc/shells work like charm

@HristoA I also installed fresh on CentOS 7.5 and /usr/sbin/nologin was already there
but/sbin/nologin wasn't. and adding/sbin/nologin solved it for me.
I guess not all images are the same. Both should be added.

@dpeca please reopen this issue. This is not fixed.
I just installed vesta again on Centos 7.5 and again FTP is not working, and I had to add both /usr/sbin/nologin and /sbin/nologin to /etc/shells.

echo "/sbin/nologin" >> /etc/shells
it work for me in Centos 7, Thanks!

I'm using v24 on CentOS 7, this issue still not fixed. So I have to add 2 lines to /etc/shells by manually.
Thanks for the best way.

@hieuhuynh93 It's fixed on GitHub just release hasn't been made yet. :/

Changed this line
pam_service_name=ftp
to
pam_service_name=vsftpd
in /etc/vsftpd/vsftpd.conf and worked for me.

Was this page helpful?
0 / 5 - 0 ratings