FTP (File Transfer Protocol) is probably the most popular method of uploading files to a server; a wide array of FTP servers, such as vsftpd, and clients exist for every platform.
- These instructions are intended specifically for installing the vsfptd on Ubuntu 12.04 LTS.
- I’ll be working from a Liquid Web Core Managed Ubuntu 12.04 LTS server, and I’ll be logged in as root.
First, you’ll follow a simple best practice: ensuring the list of available packages is up to date before installing anything new.
Then let’s install vsftpd and any required packages:
apt-get -y install vsftpd
For a refresher on editing files with vim see: New User Tutorial: Overview of the Vim Text Editor
Let’s edit the configuration file for vsftpd:
Disallow anonymous, unidentified users to access files via FTP; change the
Allow local uses to login by changing the
If you want local user to be able to write to a directory, then change the
Local users will be ‘chroot jailed’ and they will be denied access to any other part of the server; change the
Exit and save the file with the command
Restart the vsftpd service:
service vsftpd restart
Then set the vsftpd service to start at boot:
update-rc.d vsftpd defaults
With certain version of vsftpd you may receive the following error:
Not to worry! Create a new directory for the user receiving the error(
Fix permissions for
chmod a-w /home/user2/
Make a new directory for uploading files:
chown user2:user2 /home/user2/files/
Tagged with: ftp • ubuntu • ubuntu 12.04 • vsftpd