Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I installed arch lnux on Thinkpad T420 and using it as home server connected to my wireless home network. I installed ftp server but i have problem connecting to it. With Filezilla i get this error:
Code:
Could not read from transfer socket: ECONNRESET - Connection reset by peer
If i use the terminal i am able to connect to the ftp server using this command 'ftp 192.168.100.10' and then entering user and password, and i am also able to execute some commands successfully, but if i try to use ls i get disconnected with this error:
Code:
421 Service not available, remote server has closed connection
I am following the ftp setup guide from here and in /etc/vsftpd.conf file i have enabled only these two settings: write_enable=YES and local_enable=YES, and i haven't changed anything else.
I installed arch lnux on Thinkpad T420 and using it as home server connected to my wireless home network. I installed ftp server but i have problem connecting to it. With Filezilla i get this error:
Code:
Could not read from transfer socket: ECONNRESET - Connection reset by peer
If i use the terminal i am able to connect to the ftp server using this command 'ftp 192.168.100.10' and then entering user and password, and i am also able to execute some commands successfully, but if i try to use ls i get disconnected with this error:
Code:
421 Service not available, remote server has closed connection
I am following the ftp setup guide from here and in /etc/vsftpd.conf file i have enabled only these two settings: write_enable=YES and local_enable=YES, and i haven't changed anything else.
..while written for Ubuntu, is a pretty good basic guide. Ignore the steps about installing the package, all you're interested in is configuration. That said, since you're able to connect from the terminal, are you doing this from the local host or another machine on the network? If it's the local machine, have you ensured that SELinux and/or the firewall is allowing FTP? Typically, any 4xxx messages from FTP indicate connection failure. First thing you should check is firewall and SELinux.
I would say the problem is caused by attempting to set up FTP in 2021, over 20 years after it has been deprecated by SFTP. If you have a strong reason for using FTP, it is possible to get working -- with a lot of effort and fiddling, before even considering the problems that getting it through the firewall will present.
However, if your use-case is just to transfer files, or if you wish to transfer files securely, or if you have a limited amount of time and money to throw at the problem, then it would be very highly recommended to just modernize and use SFTP instead. SFTP is part of the OpenSSH server and works out of the box.
..while written for Ubuntu, is a pretty good basic guide. Ignore the steps about installing the package, all you're interested in is configuration. That said, since you're able to connect from the terminal, are you doing this from the local host or another machine on the network? If it's the local machine, have you ensured that SELinux and/or the firewall is allowing FTP? Typically, any 4xxx messages from FTP indicate connection failure. First thing you should check is firewall and SELinux.
Which logs do you need?
I installed only the basic system packages for arch linux: base, linux, linux-firmware and few additional packages, like networkmanager and sudo. I didn't install firewall and SELinux.
I am connecting from another pc on the home network, which have MX Linux installed.
I would say the problem is caused by attempting to set up FTP in 2021, over 20 years after it has been deprecated by SFTP. If you have a strong reason for using FTP, it is possible to get working -- with a lot of effort and fiddling, before even considering the problems that getting it through the firewall will present.
However, if your use-case is just to transfer files, or if you wish to transfer files securely, or if you have a limited amount of time and money to throw at the problem, then it would be very highly recommended to just modernize and use SFTP instead. SFTP is part of the OpenSSH server and works out of the box.
Security is not a issue, it's a home network. Besides, i want to use Kodi to stream videos from the laptop and the easiest way should be over ftp.
Security will be an issue at some point. An additional advantage of SFTP is that unlike FTP it can be used safely over the open Internet. With SFTP you have that option later, with FTP you don't.
Quote:
Originally Posted by peter7089
Besides, i want to use Kodi to stream videos from the laptop and
Acknowledged.
Quote:
Originally Posted by peter7089
the easiest way should be over ftp.
Nope. There are no circumstances in which FTP is the easiest to deploy.
Code:
pacman -Syu
pacman -S openssh
You mentioned FileZilla, it is one of the many clients supporting SFTP.
I can connect over ssh and sftp without problem, but Kodi don't have option for sftp connection. Before i had fedora server installed on the laptop and i was able connect to it over ftp, i don't know what is the issue with arch linux.
I don't use Kodi, so I am just guessing on that side of things, but it appears that SFTP support would be through an add-on if the package OpenSSH server is not available:
Which logs do you need?
I installed only the basic system packages for arch linux: base, linux, linux-firmware and few additional packages, like networkmanager and sudo. I didn't install firewall and SELinux. I am connecting from another pc on the home network, which have MX Linux installed.
There is something preventing a connection; and while you may not have intentionally installed a firewall (ufw? iptables?) or selinux, it may still be there. And that doesn't address whether or not you have it running on the MX Linux box, and have permissions set to allow FTP on it. And the last two FTP threads you posted indicated a firewall/connection issue as well: https://www.linuxquestions.org/quest...er-4175692043/ https://www.linuxquestions.org/quest...er-4175682832/
Quote:
Originally Posted by peter7089
Security is not a issue, it's a home network. Besides, i want to use Kodi to stream videos from the laptop and the easiest way should be over ftp.
Sorry, no...easiest way would be to use minidlna and advertise the system on the network as a DLNA server. Second easiest would be to use sshfs and mount the remote resource on the Kodi box. Third easiest is a simple Samba public share...FTP is way down the list.
SFTP support seems to be implemented recently in Kodi. Will have to test it and see how it works.
Still it will be good if i can make ftp connection work, because Krusader do not support sftp.
For what it's worth, all file managers, including krusader, support SFTP connections these days. Press ctrl-L and then enter the URI for your box. It'll be in the form sftp://peter7089@192.168.1.1/home/peter7089/ or something along those lines. Another option would be ctrl-N and then select SFTP from the pull-down menu.
Last edited by Turbocapitalist; 06-28-2021 at 01:38 AM.
If i press Ctrl+L and enter the url for sftp connection i get this:
Code:
Error: Protocol not supported by Krusader
If i press Ctrl+N in pull down menu i see only options for ftp and webdav connections.
Again, you are doing this the VERY hard way. Setting up minidlna is all you need to do...edit one config file, point it to your media folder(s), and that's it. Kodi will pick it up as just another streaming server. Done.
If all you want is media streaming, that's all you need to do.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.