How To Set Up vsftpd on Ubuntu 12.04

379人阅读 评论(0) 收藏 举报

From :

About vsftpd

Warning: FTP is inherently insecure. If you must use FTP, consider securing your FTP connection with SSL/TLS. Otherwise, it is best to use SFTP, a secure alternative to FTP.

The first two letters of vsftpd stand for "very secure" and the program was built to have strongest protection against possible FTP vulnerabilities.

Step One—Install vsftpd

You can quickly install vsftpd on your virtual private server in the command line:

sudo apt-get install vsftpd

Once the file finishes downloading, the VSFTP will be on your droplet. Generally speaking, it is already configured with a reasonable amount of security. However, it does provide access on your VPS to anonymous users.

Step Two—Configure vsftpd

Once vsftpd is installed, you can adjust the configuration.

Open up the configuration file:

sudo nano /etc/vsftpd.conf

The biggest change you need to make is to switch the Anonymous_enable from YES to NO:


Prior to this change, vsftpd allowed anonymous, unidentified users to access the server's files. This is useful if you are seeking to distribute information widely, but may be considered a serious security issue in most other cases.

After that, uncomment the local_enable option, changing it to yes and, additionally, allow the user to write to the directory.


Finish up by uncommenting command to chroot_local_user. When this line is set to Yes, all the local users will be jailed within their chroot and will be denied access to any other part of the server.


Save and Exit that file.

Because of a recent vsftpd upgrade, vsftpd is "refusing to run with writable root inside chroot". A handy way to address this issue to is to take the following steps:

  1. Create a new directory within the user's home directory
    mkdir /home/username/files
  2. Change the ownership of that file to root
    chown root:root /home/username
  3. Make all necessary changes within the "files" subdirectory

Then, as always, restart:

 sudo service vsftpd restart

Step Three—Access the FTP server

Once you have installed the FTP server and configured it to your liking, you can now access it.

You can reach an FTP server in the browser by typing the domain name into the address bar and logging in with the appropriate ID. Keep in mind, you will only be able to access the user's home directory.

Alternatively, you can reach the FTP server on your virtual server through the command line by typing:


Then you can use the word, "exit," to get out of the FTP shell.


How to Set Up vsftpd on Ubuntu 12.04 About vs...
  • Rauber_Hotzenplotz
  • Rauber_Hotzenplotz
  • 2013年07月18日 01:49
  • 496


Ubuntu 用vsftpd 配置FTP服务器 sudo apt-get install vsftpd sudo nano /etc/vsftpd.conf #禁止匿名访问 a...
  • patch
  • patch
  • 2016年08月12日 21:16
  • 551

How to set up IceScrum on Ubuntu 12.04

How to set up IceScrum on Ubuntu 12.04 Autor: Adrian Najczuk    Data publikacji: 28-08-12 Ser...
  • gujing001
  • gujing001
  • 2013年06月01日 20:21
  • 3390

How To Set Up an OpenVPN Server on Ubuntu 14.04 ...
  • wang1144
  • wang1144
  • 2015年05月13日 19:13
  • 946

ubuntu 12.04使用vsftpd建立FTP的经验整理

如果没时间去学习vsftpd,想快速配置,则看这个 先大概了解下网上的经验,都是说怎么配置匿名登录的,但是照着弄没配置成功,因此改为用户名登录,参考基础教程 http://wiki.ubuntu.o...
  • xzongyuan
  • xzongyuan
  • 2013年07月09日 16:10
  • 2222

Chinese Input Methods in Ubuntu 14, 13, 12, 11, and 10(How to Set Up Ubuntu Chinese IMEs)

original site: « Ubuntu ...
  • WanGong
  • WanGong
  • 2014年05月02日 18:24
  • 4658

ubuntu 12.04 ftp server 配置

安装:  sudo apt-get install vsftpd # vsftp(Very Secure FTP)是一种在Unix/Linux中非常安全且快速稳定的FTP服务器 安装...
  • xiaobaismiley
  • xiaobaismiley
  • 2014年05月20日 17:00
  • 7740

How to Set Up Apache Virtual Hosts on Ubuntu 12.04 LTS

What the Red Means The lines that the user needs to enter or customize will be in red in this tut...
  • acuna1
  • acuna1
  • 2013年03月21日 14:16
  • 577

Upgrade from Ubuntu 14.04. to Ubuntu 16.04 on Desktop and Server Editions

Upgrade from Ubuntu 14.04. to Ubuntu 16.04 on Desktop and Server Editions Ubuntu ...
  • MonMama
  • MonMama
  • 2016年11月08日 14:47
  • 971


楼主想把同学硬盘里面的200多G电影共享给实验室的小伙伴们看,就打算在内网服务器上搭建一个ftp的服务器。 1.安装ftp 首先在终端下键入如下内容,安装ftp服务器: sudo apt-get in...
  • looong2b
  • looong2b
  • 2014年05月09日 17:00
  • 2233
    访问量: 282万+
    积分: 3万+
    排名: 180