Changes

Created page with "=Summary= 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..."
=Summary=

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.<br />
vsftpd supports explicit (since 2.0.0) and implicit (since 2.1.0) FTPS.<br />
vsftpd is the default FTP server in the Ubuntu, CentOS, Fedora, NimbleX, Slackware and RHEL Linux distributions.<br />
You will see the vsftpd server configuration on a Ubuntu 16.04 PC.

=Configuring VSFTPD in Ubuntu=

Install the '''vsftpd''' with command '''sudo apt-get install vsftpd'''<br />

When installation is completed, open '''vsftpd.conf''' configuration file with command '''sudo nano /etc/vsftpd.conf''' (example below)

[[Image:Nano default.png]]

==Server configuration==

Now you have to configure your server. You have to find specified lines and change or '''uncomment''' them. For an easier way to find specific lines, you can press “'''CTRL+W'''” and it will show where the line is. <br />
Lines that has to match with an example:<br />
Uncomment the “'''write_enable=YES'''”, “'''ascii_upload_enable=YES'''” and “'''ascii_download_enable=YES'''” lines and make sure that the value of them is “'''YES'''”

[[Image:Line1.png]]<br />

[[Image:Line2.png]]

Scroll a little bit down and and find the section as shown in an example below. <br />

Change the “chroot” settings
Add the following lines:<br />
'''user_sub_token=$USER'''<br />
'''chroot_local_user=YES'''<br />
'''chroot_list_enable=YES'''<br />
Change the default “'''chroot'''” settings. Add the following lines:<br />
'''chroot_list_file=/etc/vsftpd.chroot_list'''<br />
'''local_root=home/$USER/Public_html'''<br />
'''''*If any of these lines already exist, remove the “#” before each line.<br />'''''
Uncomment “'''ls_recurse_enable=YES'''” line and make sure that the value is “'''YES'''”<br />

[[Image:Chroot.png]]

When configuration looks the same as in example, press “'''CTRL+X'''”, type “'''y'''” and press “'''Enter'''” button on your keyboard.

==Creating users==
Create a new user by typing “'''sudo adduser USERNAME'''” (for example, “'''sudo adduser test2'''").

[[Image:Adduser.png]]

==Adding Usernames to the CHROOT list==

Open the “'''vsftpd.chroot_list'''” text file by typing “'''sudo nano /etc/vsftpd.chroot_list'''”<br />
Type in your own username, press “'''Enter'''” on your keyboard and repeat with any other usernames of people whom you want to have access their Home directories from within your server.

[[Image:Chroot users list.png]]

Save your list by pressing “'''CTRL+X'''”, typing “''y''” and pressing “'''Enter'''” button on your keyboard.<br />

Restart VSFTPD by running “'''sudo service vsftpd restart'''”.

=Accessing your server=

==In Ubuntu terminal==

You can test server accessing with different users, which you entered before to the “'''vsftpd.chroot_list'''”.<br />
You have to check your server’s IP address by running command “'''ifconfig'''”.
Your “'''inet addr'''” is your server’s IP address. (for example '''192.168.10.10''')

[[Image:Ifconfig.png]]

You can simply access your FTP server by runing “'''ftp localhost'''” command.
For example, the user “'''test2'''” is in the “'''vsftpd.chroot_list'''” file. But user “'''test'''” is not, so login failed.

[[Image:Test2user.png]]<br />
[[Image:Testuser.png]]

If you want to close server, just type “'''bye'''”.

==Using FileZilla==

Install FileZilla by typing “'''sudo apt-get install filezilla'''” in your Ubuntu terminal.<br />

Run Filezilla by typing “'''filezilla'''” in terminal.<br />

This window appears:

[[Image:Filezilla.png]]

<span style="color:red">Connection tab.</span> Type in your host (eg. '''192.168.10.10'''), Username (eg. “'''test2'''”), password and press “'''Quickconnect'''” button.<br />

If connection and logging in are successful, you will see your home directory in <span style="color:#0f0">remote site window.</span><br />

At the left side you can navigate in your <span style="color:#0000FF">Local site</span>, search for files to upload.

[[Image:Filezilla logedin.png]]

===Uploading files to remote site===

Just simply select the file from your local site and drag it to the remote site. If upload is successful, you will see that the value of “<span style="color:#0f0">Successful transfers</span>” has changed. <br />
If not, you can see the problem in “<span style="color:red">Failed Transfers</span>” tab.

[[Image:Draging.png]]

Navigation menu