LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Does vsftpd support user subcommand? (https://www.linuxquestions.org/questions/linux-software-2/does-vsftpd-support-user-subcommand-4175612968/)

bestard 08-31-2017 04:10 AM

Does vsftpd support user subcommand?
 
I'm wondering if vsftpd supports user subcommand?
I found I can't switch user after ftp login.
Maybe someone can give me a certain answer.

I always got the message as below,

Quote:

mastest.user1{~ }% ftp mastest
Connected to mastest (172.26.80.149).
220 (vsFTPd 2.2.2)
Name (mastest:user1): user1
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> user user2
530 Can't change to another user.
Login failed.
I enabled log_ftp_protocol=YES and checked the vsftpd.log,
it didn't help much actually. The log file only showed the following message.

Quote:

Thu Aug 31 12:10:03 2017 [pid 12581] FTP response: Client "172.26.80.149", "220 (vsFTPd 2.2.2)"
Thu Aug 31 12:10:05 2017 [pid 12581] FTP command: Client "172.26.80.149", "USER user1"
Thu Aug 31 12:10:05 2017 [pid 12581] [user1] FTP response: Client "172.26.80.149", "331 Please specify the password."
Thu Aug 31 12:10:07 2017 [pid 12581] [user1] FTP command: Client "172.26.80.149", "PASS <password>"
Thu Aug 31 12:10:07 2017 [pid 12580] [user1] OK LOGIN: Client "172.26.80.149"
Thu Aug 31 12:10:07 2017 [pid 12582] [user1] FTP response: Client "172.26.80.149", "230 Login successful."
Thu Aug 31 12:10:07 2017 [pid 12582] [user1] FTP command: Client "172.26.80.149", "SYST"
Thu Aug 31 12:10:07 2017 [pid 12582] [user1] FTP response: Client "172.26.80.149", "215 UNIX Type: L8"
Thu Aug 31 12:10:16 2017 [pid 12582] [user1] FTP command: Client "172.26.80.149", "USER user2"
Thu Aug 31 12:10:16 2017 [pid 12582] [user1] FTP response: Client "172.26.80.149", "530 Can't change to another user."
I didn't change many default settings of vsftpd.conf, however, it may be worth of taking a look.

Code:

anonymous_enable=YES
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_std_format=NO
ascii_upload_enable=YES
ascii_download_enable=YES
listen=YES
pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
use_localtime=YES
log_ftp_protocol=YES

How can I do to switch users after ftp login using vsftpd?
Hope someone can gives me suggestions. Thanks.

astrogeek 08-31-2017 10:46 PM

To my knowledge, FTP itself does not support changing user after login. I think you must logout, then login as the other user.

bestard 09-01-2017 01:44 AM

Quote:

Originally Posted by astrogeek (Post 5754331)
To my knowledge, FTP itself does not support changing user after login. I think you must logout, then login as the other user.

Thank you for information.

It seems like most of popular ftp daemons don't support switching user at post login in Linux system, am I right?
I'm not quite sure about this.
I've tested embedded ftp daemon on Solaris 8, it allowed users to switch identification after login while RHEL on the contrary.
Maybe it's due to an out-dated Solaris 8 system with an old function.

We had some in-house utilities developed on Solaris 8 using original ftp daemon service and USER command was used after ftp login.
It may has security concerns over original daemon, so I replaced in.ftpd with vsftpd.
If the USER command is not supported, there is nothing to do. but revise our programs.


All times are GMT -5. The time now is 03:53 PM.