Home > php教程 > PHP开发 > How to set up FTP under Linux

How to set up FTP under Linux

高洛峰
Release: 2016-12-20 09:22:32
Original
1175 people have browsed it

1. First use the rpm -qa| grep vsftpd command to check whether ftp has been installed. If ftp is not installed, use yum -y install vsftpd to install it (under ubuntu, use apt-get install vsftpd)

2. service vsftpd start

Startup To make FTP start automatically every time you boot, run the command: chkconfig --level 35 vsftpd on

3. Set ftp permissions

vi /etc/vsftpd/vsftpd.conf
Change anonymous_enable=YES to anonymous_enable=NO
ESC returns, enter ":wq" to save and launch

4. Add ftp account and directory

useradd -d /alidata/www/wwwroot -s /sbin/nologin pwftp
passwd pwftp
chmod -R 755 /alidata/www /wwwroot
chown -R pwftp /alidata/www/wwwroot
/etc/rc.d/init.d/vsftpd restart
Then use the account pwftp password 123456
to test and you can log in to ftp. The directory is /alidata/www/wwwroot



For more related articles on how to set up FTP under Linux, please pay attention to the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template