FTP connection fails while SFTP works











up vote
0
down vote

favorite












EDIT: figured it out, I needed to comment out SSL stuffs to make it FTP.



Problem:



I'm running sFTP with SSL using vsftpd.



AsI can't access sFTP on browser(without extension), now I want to get FTP working again.



After purge & reinstall of vsftpd, I found out FTP is running on default settings(which can be connected but shows no directory) while sFTP is still running with previous settings. So I decided to keep both FTP & sFTP running at same time.



Then I changed vsftpd.conf as Follows:



listen=YES
listen_ipv6=YES
anonymous_enable=YES
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=NO
connect_from_port_20=YES
chroot_local_user=YES
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd.chroot_list
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd_FTP
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
ssl_enable=NO
utf8_filesystem=YES
local_root=/home/upload/ftp/
force_local_data_ssl=NO
force_local_logins_ssl=NO


But after changing vsftpd.conf, FTP is now dead again with "connection is refused", while sFTP is still working properly.



Previous Settings that sFTP was using as Follows:



listen=YES
listen_ipv6=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=NO
connect_from_port_20=YES
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd
rsa_cert_file=/etc/ssl/private/vsftpd.pem
rsa_private_key_file=/etc/ssl/private/vsftpd.pem
ssl_enable=YES
utf8_filesystem=YES
user_sub_token=$USER
local_root=/home/upload/ftp/ETC
allow_anon_ssl=YES
force_local_data_ssl=NO
force_local_logins_ssl=NO
listen_port=21
listen_port=22


Question:




  1. [solved] What part of my config file is causing "connection refused"?


  2. How sFTP is still running even after purge, and where is it's setting files?


  3. [solved] Why 'local_root=/home/upload/ftp/' option is doing nothing?











share|improve this question
























  • in Ubuntu, sftp is typically managed by openssh-server as embedded into the system. Do you have OpenSSH Server installed on this system?
    – Thomas Ward
    Dec 2 at 17:40















up vote
0
down vote

favorite












EDIT: figured it out, I needed to comment out SSL stuffs to make it FTP.



Problem:



I'm running sFTP with SSL using vsftpd.



AsI can't access sFTP on browser(without extension), now I want to get FTP working again.



After purge & reinstall of vsftpd, I found out FTP is running on default settings(which can be connected but shows no directory) while sFTP is still running with previous settings. So I decided to keep both FTP & sFTP running at same time.



Then I changed vsftpd.conf as Follows:



listen=YES
listen_ipv6=YES
anonymous_enable=YES
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=NO
connect_from_port_20=YES
chroot_local_user=YES
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd.chroot_list
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd_FTP
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
ssl_enable=NO
utf8_filesystem=YES
local_root=/home/upload/ftp/
force_local_data_ssl=NO
force_local_logins_ssl=NO


But after changing vsftpd.conf, FTP is now dead again with "connection is refused", while sFTP is still working properly.



Previous Settings that sFTP was using as Follows:



listen=YES
listen_ipv6=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=NO
connect_from_port_20=YES
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd
rsa_cert_file=/etc/ssl/private/vsftpd.pem
rsa_private_key_file=/etc/ssl/private/vsftpd.pem
ssl_enable=YES
utf8_filesystem=YES
user_sub_token=$USER
local_root=/home/upload/ftp/ETC
allow_anon_ssl=YES
force_local_data_ssl=NO
force_local_logins_ssl=NO
listen_port=21
listen_port=22


Question:




  1. [solved] What part of my config file is causing "connection refused"?


  2. How sFTP is still running even after purge, and where is it's setting files?


  3. [solved] Why 'local_root=/home/upload/ftp/' option is doing nothing?











share|improve this question
























  • in Ubuntu, sftp is typically managed by openssh-server as embedded into the system. Do you have OpenSSH Server installed on this system?
    – Thomas Ward
    Dec 2 at 17:40













up vote
0
down vote

favorite









up vote
0
down vote

favorite











EDIT: figured it out, I needed to comment out SSL stuffs to make it FTP.



Problem:



I'm running sFTP with SSL using vsftpd.



AsI can't access sFTP on browser(without extension), now I want to get FTP working again.



After purge & reinstall of vsftpd, I found out FTP is running on default settings(which can be connected but shows no directory) while sFTP is still running with previous settings. So I decided to keep both FTP & sFTP running at same time.



Then I changed vsftpd.conf as Follows:



listen=YES
listen_ipv6=YES
anonymous_enable=YES
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=NO
connect_from_port_20=YES
chroot_local_user=YES
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd.chroot_list
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd_FTP
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
ssl_enable=NO
utf8_filesystem=YES
local_root=/home/upload/ftp/
force_local_data_ssl=NO
force_local_logins_ssl=NO


But after changing vsftpd.conf, FTP is now dead again with "connection is refused", while sFTP is still working properly.



Previous Settings that sFTP was using as Follows:



listen=YES
listen_ipv6=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=NO
connect_from_port_20=YES
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd
rsa_cert_file=/etc/ssl/private/vsftpd.pem
rsa_private_key_file=/etc/ssl/private/vsftpd.pem
ssl_enable=YES
utf8_filesystem=YES
user_sub_token=$USER
local_root=/home/upload/ftp/ETC
allow_anon_ssl=YES
force_local_data_ssl=NO
force_local_logins_ssl=NO
listen_port=21
listen_port=22


Question:




  1. [solved] What part of my config file is causing "connection refused"?


  2. How sFTP is still running even after purge, and where is it's setting files?


  3. [solved] Why 'local_root=/home/upload/ftp/' option is doing nothing?











share|improve this question















EDIT: figured it out, I needed to comment out SSL stuffs to make it FTP.



Problem:



I'm running sFTP with SSL using vsftpd.



AsI can't access sFTP on browser(without extension), now I want to get FTP working again.



After purge & reinstall of vsftpd, I found out FTP is running on default settings(which can be connected but shows no directory) while sFTP is still running with previous settings. So I decided to keep both FTP & sFTP running at same time.



Then I changed vsftpd.conf as Follows:



listen=YES
listen_ipv6=YES
anonymous_enable=YES
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=NO
connect_from_port_20=YES
chroot_local_user=YES
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd.chroot_list
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd_FTP
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
ssl_enable=NO
utf8_filesystem=YES
local_root=/home/upload/ftp/
force_local_data_ssl=NO
force_local_logins_ssl=NO


But after changing vsftpd.conf, FTP is now dead again with "connection is refused", while sFTP is still working properly.



Previous Settings that sFTP was using as Follows:



listen=YES
listen_ipv6=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=NO
connect_from_port_20=YES
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd
rsa_cert_file=/etc/ssl/private/vsftpd.pem
rsa_private_key_file=/etc/ssl/private/vsftpd.pem
ssl_enable=YES
utf8_filesystem=YES
user_sub_token=$USER
local_root=/home/upload/ftp/ETC
allow_anon_ssl=YES
force_local_data_ssl=NO
force_local_logins_ssl=NO
listen_port=21
listen_port=22


Question:




  1. [solved] What part of my config file is causing "connection refused"?


  2. How sFTP is still running even after purge, and where is it's setting files?


  3. [solved] Why 'local_root=/home/upload/ftp/' option is doing nothing?








ftp sftp vsftpd






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 2 at 17:37

























asked Nov 7 at 7:31









백준영

84




84












  • in Ubuntu, sftp is typically managed by openssh-server as embedded into the system. Do you have OpenSSH Server installed on this system?
    – Thomas Ward
    Dec 2 at 17:40


















  • in Ubuntu, sftp is typically managed by openssh-server as embedded into the system. Do you have OpenSSH Server installed on this system?
    – Thomas Ward
    Dec 2 at 17:40
















in Ubuntu, sftp is typically managed by openssh-server as embedded into the system. Do you have OpenSSH Server installed on this system?
– Thomas Ward
Dec 2 at 17:40




in Ubuntu, sftp is typically managed by openssh-server as embedded into the system. Do you have OpenSSH Server installed on this system?
– Thomas Ward
Dec 2 at 17:40















active

oldest

votes











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1090723%2fftp-connection-fails-while-sftp-works%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1090723%2fftp-connection-fails-while-sftp-works%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Mouse cursor on multiple screens with different PPI

Agildo Ribeiro

Sometime when accessing a menu: “Ubuntu 16.04 has experienced an internal error”