Ubuntu FTP Server Setup

Source: Internet
Author: User

Linux FTP Server Deployment

1.sudo apt-get Install VSFTPD # #下载vsftpd

2.sudo vim/etc/vsftpd.conf # #vsftpd配置文件

Add to
#禁止匿名访问
Anonymous_enable=no
#接受本地用户
Local_enable=yes
#允许上传
Write_enable=yes
#用户只能访问限制的目录
Chroot_local_user=yes
#设置固定目录, add at the end. If you do not add this line, each user corresponding to their own directory, of course, this folder to build their own
Local_root=/home/ftp/data

3. Add the appropriate directory

sudo mkdir/home/ftp
sudo chmod a-w/home/ftp
sudo mkdir/home/ftp/data

sudo mkdir/home/ftp/data/upload
sudo mkdir/home/ftp/data/download
sudo chmod 777/home/ftp/data/upload
sudo chmod 755/home/ftp/data/download

4. Add Users

sudo useradd-d/home/ftp-m ftpuser

sudo passwd ftpuser # #设置密码

5. This time directly with Useradd account login FTP will 530 login incorrect

sudo vim/etc/pam.d/vsftpd

Comment out

#auth Required Pam_shells.so

6. Restart VSFTPD

sudo service vsftpd restart

About User Access folder restrictions

By the Chroot_local_user, chroot_list_enable, chroot_list_file These three documents control, to transfer someone's passage:

First of all, chroot_list_enable good understanding, is: whether to enable Chroot_list_file configuration of the file, if yes indicates that the Chroot_list_file configuration of the file to take effect, otherwise does not take effect;
Second, Chroot_list_file is also simple, configure a file path, the default is/etc/vsftpd.chroot_list, the file will be filled with some account names. However, the meaning of these accounts is not fixed and is related to the configuration item Chroot_local_user. Described in the following article;
Third, Chroot_local_user for yes means that all users * cannot * switch to a directory other than the home directory, but! The user is listed in addition to the Chroot_list_file configuration file. Chroot_local_user for no means that all users can * switch to a directory other than the home directory, but! The user is listed in addition to the Chroot_list_file configuration file. It can also be understood that chroot_list_file lists the "exceptions" to the user.

"Failed to connect in PASV mode" prompt when client logs in

Edit/etc/vsftpd.conf

Last Added

Pasv_promiscuous=yes

Then restart the VSFTPD service.

Ubuntu FTP Server Setup

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.