Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

2009

Continual Services
Innovations @ SWS

SYED

[HOW TO SETUP FTP SERVER


ON SUSE 10.3]
This document will assist you on how to setup and configure ftp server using vsftpd services on Linux
SUSE 10.3 with simple and easy guide.
Table of Contents
1. Requirement ...................................................................................................................................... 3
2. Setup VSFTPD................................................................................................................................... 3
3. Setting /etc/vsftpd.conf .................................................................................................................. 3
a. Run the VSFTPD ............................................................................................................................ 3
b. Testing VSFTPD status ................................................................................................................. 3
c. The configuration file (/etc/vsftpd.conf) .................................................................................... 4
4. Setup directory for FTP / User group.......................................................................................... 4
a. Create FTP group / directory ........................................................................................................ 4
b. Create / Assign User ...................................................................................................................... 4
c. Change permission on all folders ................................................................................................ 4
d. Restart services .............................................................................................................................. 4
FTP Setup using VSFTPD in SUSE 10.3

1. Requirement
a. Installed server with SUSE 10.3
b. SUSE 10.3 DVD mounted in server

2. Setup VSFTPD
a. Login to the server using remote / local
b. Type yast2
c. Software > Software Management >
d. ALT+s for search
e. Type in vsftpd
f. Check the package using SPASE BAR key
g. ALT+a for accepts
h. Wait until finish, quit the yast2 (ALT+q)

3. Setting /etc/vsftpd.conf

a. Run the VSFTPD

The starting and stopping of VSFTP is controlled by xinetd via the /etc/xinetd.d/vsftpd
file. VSFTP is deactivated by default, so you’ll have to edit this file to start the program.
Make sure the contents look like this.
The disable feature must be set to "no" to accept connections.
service ftp
{
disable = no
socket_type = stream
wait = no
user = root
server = /usr/sbin/vsftpd
nice = 10
}
You will then have to restart xinetd for these changes to take effect using the startup
script in the /etc/init.d directory.
[root@aqua tmp]# /etc/init.d/xinetd restart
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]

b. Testing VSFTPD status

You can always test whether the VSFTP process is running by using the netstat –a
command which lists all the TCP and UDP ports on which the server is listening for
traffic. The example below shows the expected output, there would be no output at all if
VSFTP wasn’t running.
[root@bigboy root]# netstat -a | grep ftp
tcp 0 0 *:ftp *:* LISTEN
[root@bigboy root]#
c. The configuration file (/etc/vsftpd.conf)

Please copy the file attached and paste to the /etc/vsftpd.conf on your server
Explanation on this file:

1. Anonymous user is enable


2. Anonymous user can upload file to the server on /home/ftp-files/anon-
upload directory
3. Default root directory is at /home/ftp-files
4. Port 20 is enable

4. Setup directory for FTP / User group

a. Create FTP group / directory

Create a user group and shared directory. In this case we’ll use "/home/ftp-users" and a
user group name of "ftp-users” for the remote users.
[root@bigboy tmp]# groupadd ftp-users
[root@bigboy tmp]# mkdir /home/ftp-files
[root@bigboy tmp]# mkdir /home/ftp-files/anon-upload

Make the directory accessible to the ftp-users group.


[root@bigboy tmp]# chmod 750 /home/ftp-files
[root@bigboy tmp]# chown root:ftp-users /home/ftp-files

b. Create / Assign User

Run the yast2 again, yast2


i. Security an Users > User Management
ii. Select any user that you need, then press Enter
iii. ALT+d for details
iv. ALT+o for group
v. Check in the ftp-users group
vi. ALT+a for accepts
vii. ALT+f for finish
viii. ALT+q for quit

c. Change permission on all folders

Change the permissions of the files in the /home/ftp-files directory for read only access
by the group and read/write /home/ftp-files/anon-upload by anonymous and user
[root@bigboy tmp]# chown root:ftp-users /home/ftp-files/*
[root@bigboy tmp]# chmod 555 /home/ftp-files/
[root@bigboy tmp]# chmod 777 /home/ftp-files/anon-upload

d. Restart services

[root@bigboy tmp]# /etc/init.d/xinetd restart


Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]
[root@bigboy tmp]#

You might also like