Set up FTP service on Linux

Source: Internet
Author: User
Install the FTP server on your FC4 machine today to allow others to share data over FTP.

I checked it online. The FTP servers that are commonly used include Wu-FTP, ProFTP, and vsftp.

I have selected vsftp. It is nothing else, because it is called very secure. Its design was originally considered for security.

Go to the main site under vsftp version 2.04, not big, more than one hundred kb. Yes: ftp://vsftpd.beasts.org/users/cevans/vsftpd-2.0.4.tar.gz

After the installation is complete, make and perform n steps before make install.
1) Add a nobody user # useradd nobody
2) If make does not generate the/usr/share/empty directory, create this directory, # mkdir/usr/share/empty
3) If FTP requires anonymous (anonymous) users, you need to create an FTP user and specify its home directory as/var/FTP # useradd-D/var/FTP
4) change the ownership of the/var/FTP folder and change the access permission # chown root. Root/var/FTP # chmod 755/var/ftp
5) make install

After make install, You need to manually copy vsftpd. conf to the/etc directory. The Install file is like this:
"Make install" doesn' t copy the sample config file. It is recommended youdo this:
CP vsftpd. CONF/etc

the following figure is available. however, you can start the FTP service in two ways. one is smoke test (without an inetd ). the other is run from an inetd of some kind
about the inted method, I still cannot find this service in my FC4 or this file. didn't I install this package? Although more functions are available through the inted method, we have to use the smoke test function.
Modify/etc/vsftpd. conf then add Listen = yes to the last line
and then start/usr/local/sbin/vsftpd &, of course, ensure that no Program occupies port 21.
enter FTP 172.0.0.1
:
connected to localhost (127.0.0.1 ).
220 (vsftpd 1.1.1)
name (localhost: Chris): ftp
331 please specify the password.
password:
230 login successful. have fun.
remote system type is UNIX.
using binary mode to transfer files.
ftp> ls
.....

Problem:
1. check whether a program occupies a port and close the Port:
Netstat-anp | more
The PID, port number, and other information of a process are displayed, and the root is used to close the port. one method is to use the sercive program name stop, and the other is to use the kill-9 PID to close.

2. There is a default firewall in Linux. If other hosts cannot log on, no route to host is reported.
Choose desktop> system Settings> Security level. You can also use the iptables command, for example:
[Root @ t81a143 ~] # Iptables-F
[Root @ t81a143 ~] # Iptables-x
[Root @ t81a143 ~] # Iptables-T nat-F
[Root @ t81a143 ~] # Iptables-T nat-x
[Root @ t81a143 ~] # Iptables-T mangle-F
[Root @ t81a143 ~] # Iptables-T mangle-x

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.