You are not logged in.

#1 2018-09-28 18:07:16

schwim
Member
From: Western NC, US
Registered: 2015-09-29
Posts: 183
Website

[SOLVED] Unable to log into FTP after vsFTPd install

Hi there guys,

I've got a fresh Deb 9 install with a lamp stack that's working well but I'd like to be able to FTP into /var/www with a local user so I followed this guide and placed local_root with my desired directory at the bottom of the .conf but when I try to log in with a local user, I get an incorrect login error.  Here's my conf file.

Could someone help me figure out how to get logged in with proper access to the desired directory?

Thanks for your time!

Last edited by schwim (2018-10-01 21:18:36)


Schw.im! A social site with an identity crisis.

Offline

#2 2018-09-30 10:09:53

iMBeCil
WAAAT?
From: Edrychwch o'ch cwmpas
Registered: 2015-09-29
Posts: 520

Re: [SOLVED] Unable to log into FTP after vsFTPd install

Does logging in work without the 'local_root=/var/www' directive?

EDIT: I installed vsftpd, and I can confirm that it works with '$ftp localhost':
- with default configuration (I end up in my own home dir after logging in)
- with your configuration, with 'local_root=/var/www' (I end up in /var/www dir after logging in)

(All this is done on stock BL Helium, without LAMP, only vsftp.)

Did you do 'systemctl restart vsftpd.service' after changing conf file?
Is vsftp running:

$ ps ax | grep ftp
 3338 ?        Ss     0:00 /usr/sbin/vsftpd /etc/vsftpd.conf

Last edited by iMBeCil (2018-09-30 10:43:38)


Postpone all your duties; if you die, you won't have to do them ..

Offline

#3 2018-09-30 15:06:13

schwim
Member
From: Western NC, US
Registered: 2015-09-29
Posts: 183
Website

Re: [SOLVED] Unable to log into FTP after vsFTPd install

Hi there, Im and thanks for the help!

root@server:~# ps ax | grep ftp
1054 ?        Ss     0:00 /usr/lib/openssh/sftp-server
1643 ?        Ss     0:00 /usr/sbin/vsftpd /etc/vsftpd.conf
13717 pts/4    S+     0:00 grep ftp
root@server:~#

If I try to log in via FTP app, it just says incorrect login and if I try via the browser, it just brings the login popup back up.

When in the terminal:

$ ftp localhost
Connected to localhost.
220 (vsFTPd 3.0.3)
Name (localhost:schwim): schwim
331 Please specify the password.
Password:
530 Login incorrect.
Login failed.
ftp>

I'm trying to log in with created local user.  I've successfully logged into SSH with this user and landed in their home directory. I'm not sure what I'm doing wrong.


Schw.im! A social site with an identity crisis.

Offline

#4 2018-09-30 15:36:15

iMBeCil
WAAAT?
From: Edrychwch o'ch cwmpas
Registered: 2015-09-29
Posts: 520

Re: [SOLVED] Unable to log into FTP after vsFTPd install

I think this one makes problem:

$ ps ax | grep ftp
1054 ?        Ss     0:00 /usr/lib/openssh/sftp-server

It looks like you have TWO ftp servers running in parallel. (Note that I have only vsftpd server running.)

Try to stop this 'sftp-server', and try again.

To stop it try something like:

$ sudo systemctl stop sftp<TAB><TAB>

Hopefully, <TAB>s will find the right one  smile

EDIT: according to google, they share same port number 22. And this 'sftp-server' is actually ssh-server with someone connected via sftp. Let me check it on my BL Helium ...

Last edited by iMBeCil (2018-09-30 15:41:01)


Postpone all your duties; if you die, you won't have to do them ..

Offline

#5 2018-09-30 15:40:48

schwim
Member
From: Western NC, US
Registered: 2015-09-29
Posts: 183
Website

Re: [SOLVED] Unable to log into FTP after vsFTPd install

I tried with and without tabs:

root@server:~# systemctl stop sftp
Failed to stop sftp.service: Unit sftp.service not loaded.
root@server:~#

root@server:~# systemctl stop sftp-server
Failed to stop sftp-server.service: Unit sftp-server.service not loaded.
root@server:~#

Last edited by schwim (2018-09-30 15:42:20)


Schw.im! A social site with an identity crisis.

Offline

#6 2018-09-30 15:54:00

iMBeCil
WAAAT?
From: Edrychwch o'ch cwmpas
Registered: 2015-09-29
Posts: 520

Re: [SOLVED] Unable to log into FTP after vsFTPd install

Well, this is the most extraordinary. It all works on my setup (even with sftp-server):

$ ps ax | grep ftp
  425 ?        Ss     0:00 /usr/sbin/vsftpd /etc/vsftpd.conf
 1790 pts/0    S+     0:00 sftp localhost
 1799 ?        Ss     0:00 /usr/lib/openssh/sftp-server
 2317 pts/1    S+     0:00 grep ftp
$ ftp localhost
Connected to localhost.
220 (vsFTPd 3.0.3)
Name (localhost:someuser): someuser
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> pwd
257 "/var/www" is the current directory
ftp>

I'm running out of ideas. Perhaps you have certain configuration setting somewhere, which breaks ftp?

Well ... try to doublecheck everything? Try to enable logging in the vsftpd server, perhaps there will be certain informations?

Sorry it doesn't work for you.


Postpone all your duties; if you die, you won't have to do them ..

Offline

#7 2018-09-30 16:08:46

schwim
Member
From: Western NC, US
Registered: 2015-09-29
Posts: 183
Website

Re: [SOLVED] Unable to log into FTP after vsFTPd install

iMBeCil wrote:

Sorry it doesn't work for you.

It's ok, I find it par for the course when looking back on my life with linux smile

Over the last 4 days, I've well exceeded the double-checking of the configuration files and I see nothing in the logs that I understand well enough to have help me.

Is there any way I can get around this?  Another ftp server?  Perhaps I'll try some SSHFiletransfer.  There's got to be a way for me to get files to this machine.


Schw.im! A social site with an identity crisis.

Offline

#8 2018-09-30 16:19:06

iMBeCil
WAAAT?
From: Edrychwch o'ch cwmpas
Registered: 2015-09-29
Posts: 520

Re: [SOLVED] Unable to log into FTP after vsFTPd install

^Well, why don't you use built-in sftp server - this is the secure ftp server included in openssh-server (i.e. ssh server). And you already have ssh server installed, haven't you?

Today's ftp GUI clients usually have sftp included (mostly?). It is even possible to configure your setup in a such manner that Thunar file manager can open for example 'sftp://someuser@some.site.com[:portnumber]/some/dir'. I use this approcah on number of my remote sites where openssh-server is installed ...

Last edited by iMBeCil (2018-09-30 16:19:35)


Postpone all your duties; if you die, you won't have to do them ..

Offline

#9 2018-09-30 18:16:28

twoion
ほやほや
Registered: 2015-08-10
Posts: 2,228

Re: [SOLVED] Unable to log into FTP after vsFTPd install

I've tried setting up vsftpd, proftpd and so on myself and failed (=refused to spend more time on this). As Imbecil suggested, SFTP of OpenSSH is by far the easiest to setup and use FTP-like service. The sftp command line client (not to mention other tools that can use SFTP) is quite nice too and mimics classic FTP clients.


Im grünen Wald, dort wo die Drossel singt…

Offline

#10 2018-09-30 18:26:51

iMBeCil
WAAAT?
From: Edrychwch o'ch cwmpas
Registered: 2015-09-29
Posts: 520

Re: [SOLVED] Unable to log into FTP after vsFTPd install

twoion wrote:

I've tried setting up vsftpd, proftpd and so on myself and failed.

Now, this is strange, as I spent nearly zero time to setup vsftpd. Simply 'apt-get install vsftpd', and I was up and running with default configuration (no restart needed). Single 'systemctl restart vsftpd' after changing '/etc/vsftpd.conf'. (Stock BL Helium, no LAMP.) What were you, people, doing? glasses

NB. Only difference is that I did it in VirtualBox, so my ip was from private range. I couldn't find anything in vsftpd documentation, related to private/public ip range ...


Postpone all your duties; if you die, you won't have to do them ..

Offline

#11 2018-09-30 23:58:27

schwim
Member
From: Western NC, US
Registered: 2015-09-29
Posts: 183
Website

Re: [SOLVED] Unable to log into FTP after vsFTPd install

I can appreciate the simplicity for you but everything I've tried has failed.  Like twoion, I'm pretty much over it.

So my next question, if I simply purge vsftp from the machine, I can then set up sftp to handle the ftp duties?  Since iMBeCiL pointed out that it's already running, would I just need to edit the cfg for it?


Schw.im! A social site with an identity crisis.

Offline

#12 2018-10-01 05:49:33

iMBeCil
WAAAT?
From: Edrychwch o'ch cwmpas
Registered: 2015-09-29
Posts: 520

Re: [SOLVED] Unable to log into FTP after vsFTPd install

Again, sorry it doesn't work for you, I really cannot guess what could be wrong.

schwim wrote:

So my next question, if I simply purge vsftp from the machine, I can then set up sftp to handle the ftp duties?  Since iMBeCiL pointed out that it's already running, would I just need to edit the cfg for it?

As soon as you have installed openssh-server, you are ready to use clients like 'sftp' (this is part of openssh-client) to connect to your server. There is nothing special to set up, except, of course, login directory: /var/www (I dont know how to do it, and ATM don't have time to read man). The username/pass are the same as for the ssh connection.

Example how the 'sftp' connection goes:

$ sftp localhost
someuser@localhost's password: 
Connected to localhost.
sftp> pwd
Remote working directory: /home/someuser
sftp>

Postpone all your duties; if you die, you won't have to do them ..

Offline

#13 2018-10-01 21:18:10

schwim
Member
From: Western NC, US
Registered: 2015-09-29
Posts: 183
Website

Re: [SOLVED] Unable to log into FTP after vsFTPd install

Hi there guys,

I just switched connection method to sftp and connected without issue.   I purged vsftpd.

Thanks for all the help!


Schw.im! A social site with an identity crisis.

Offline

Board footer

Powered by FluxBB