Menu

Install and Configure vsftpd on Ubuntu

vsftpd, (or very secure FTP daemon),is an FTP server for Unix-like systems, including Linux. It is licensed under the GNU General Public License. It supports IPv6 and SSL.

vsftpd supports explicit (since 2.0.0) and implicit (since 2.1.0) FTPS.
vsftpd is the default FTP server in the Ubuntu, CentOS, Fedora, NimbleX, Slackware and RHEL Linux distributions.
Install vsftpd
First, you’ll follow a simple best practice: ensuring the list of available packages is up to date before installing anything new.
[root@hackthesec]# apt-get update
Then let’s install vsftpd and any required packages:
[root@hackthesec]# apt-get -y install vsftpd
Configure vsftpd
Let’s edit the configuration file for vsftpd:
[root@hackthesec]# vim /etc/vsftpd.conf
Disallow anonymous, unidentified users to access files via FTP; change the anonymous_enable setting to NO:
anonymous_enable=NO
Allow local uses to login by changing the local_enable setting to YES:
local_enable=YES
If you want local user to be able to write to a directory, then change the write_enable setting to YES:
write_enable=YES
Local users will be ‘chroot jailed’ and they will be denied access to any other part of the server; change the chroot_local_user setting to YES:
chroot_local_user=YES
Exit and save the file with the command :wq

Restart the vsftpd service:
service vsftpd restart
Configure the User’s Home Directory
With certain version of vsftpd you may receive the following error: 500 OOPS: vsftpd: refusing to run with writable root inside chroot().

Create a new directory for the user receiving the error (testuser in this case) that is a subdirectory of their home directory (/home/testuser ). For example:
Fix permissions for testuser  home directory:
chmod a-w /home/testuser/
Make a new directory for uploading files:
mkdir /home/testuser/testuser
chown testuser:testuser/home/testuser/testuser/

About Author:


I am a Linux Administrator and Security Expert with this site i can help lot's of people about linux knowladge and as per security expert i also intersted about hacking related news.TwitterFacebook

Next
Newer Post
Previous
Older Post

0 comments:

Post a Comment

 
Top