Sie sind auf Seite 1von 3

GNU Public License 2010

TITLE :

VSFTPd Setup on Ubuntu Server

OBJECTIVES :

To create FTP server using VSFTPd which installed on Ubuntu server machine and give permission
for anonymous user to upload, download, share or remove their files in FTP server. All user can access
this server freely. This machine also called as “Sharing Machine”.

EXECUTION :

Firstly, we must login into Ubuntu server machine with sudoers account (ask the username/password
to administrator). After we entered the machine successfully, do these steps :

1. Login as root

user@jalunet>sudo su
password: (enter your sudoers password here)
root@jalunet#

2. Install VSFTPd via port on Ubuntu

root@jalunet#apt-get install vsftpd

(--------Output omitted--------)

3. Edit VSFTPd file configuration using editor (you can use mcedit, nano, vim, etc.). Generally,
vsftpd.conf was placed in /etc/ but in another case, it’ll be placed in different location. Just
find the file using find or locate command.

root@jalunet#mcedit /etc/vsftpd.conf (my configuration like as follows)

# Run standalone? vsftpd can run either from an inetd or as a standalone


# daemon started from an initscript.
listen=YES

# Allow anonymous FTP? (Disabled by default)


anonymous_enable=YES

# Uncomment this to allow local users to log in.


local_enable=YES

# Uncomment this to enable any form of FTP write command.


write_enable=YES

# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)
#local_umask=022
anon_umask=0000

# Uncomment this to allow the anonymous FTP user to upload files. This only
# has an effect if the above global write enable is activated. Also, you will
# obviously need to create a directory writable by the FTP user.
anon_upload_enable=YES

© http://www.oscentre.co.nr Page 1
GNU Public License 2010

# Uncomment this if you want the anonymous FTP user to be able to create
# new directories.
anon_mkdir_write_enable=YES
anon_other_write_enable=YES

# Activate directory messages - messages given to remote users when they


# go into a certain directory.
dirmessage_enable=YES

# If enabled, vsftpd will display directory listings with the time


# in your local time zone. The default is to display GMT. The
# times returned by the MDTM FTP command are also affected by this
# option.
use_localtime=YES

# Activate logging of uploads/downloads.


xferlog_enable=YES

# Make sure PORT transfer connections originate from port 20 (ftp-data).


connect_from_port_20=YES

# If you want, you can arrange for uploaded anonymous files to be owned by
# a different user. Note! Using "root" for uploaded files is not
# recommended!
chown_uploads=YES
chown_username=ftp
chown_upload_mode=0777

# You may override where the log file goes if you like. The default is shown
# below.
xferlog_file=/var/log/vsftpd.log

# You may fully customise the login banner string:


ftpd_banner=Selamat datang di FTP-Jalunet.

# This option should be the name of a directory which is empty. Also, the
# directory should not be writable by the ftp user. This directory is used
# as a secure chroot() jail at times vsftpd does not require filesystem
# access.
secure_chroot_dir=/var/run/vsftpd/empty

# This string is the name of the PAM service vsftpd will use.
pam_service_name=vsftpd

# This option specifies the location of the RSA certificate to use for SSL
# encrypted connections.
rsa_cert_file=/etc/ssl/private/vsftpd.pem

anon_root=/home/ftp

The red line is parts that we should pay attention!

© http://www.oscentre.co.nr Page 2
GNU Public License 2010

4. Running vsftpd service on our machine

root@jalunet#service vsftpd start

in another way, you can type

root@jalunet#/etc/init.d/vsftpd start

There is several parameter in vsftpd command, i.e. :

root@jalunet#/etc/init.d/vsftpd start
root@jalunet#/etc/init.d/vsftpd restart
root@jalunet#/etc/init.d/vsftpd stop

© http://www.oscentre.co.nr Page 3

Das könnte Ihnen auch gefallen