chea koemleang koemleang.chea@gmail · chea koemleang [email protected] by default, after...

14
CHEA Koemleang [email protected] http://koemleang.wordpress.com This document is described about how to install and configure PureFTP server in SuSE Linux Enterprise Server 11. 1. How to install PureFTP on SLES 11 2. How to allow Anonymous users to log in to the PureFTP server, download and upload files 3. How to create Virtual Host for Anonymous users 4. How to create FTP user account, allow user to create, upload, download, rename file, … 5. How to configure auto-created home directory for authenticated users 1. How to install PureFTP on SLES 11 To install the PureFTP on SLES 11, type yast –i

Upload: doanxuyen

Post on 31-Aug-2018

223 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CHEA Koemleang koemleang.chea@gmail · CHEA Koemleang koemleang.chea@gmail.com  By default, after installing the package, its service does not start automatically

CHEA Koemleang [email protected]

http://koemleang.wordpress.com

This document is described about how to install and configure PureFTP server in SuSE Linux

Enterprise Server 11.

1. How to install PureFTP on SLES 11

2. How to allow Anonymous users to log in to the PureFTP server, download and

upload files

3. How to create Virtual Host for Anonymous users

4. How to create FTP user account, allow user to create, upload, download, rename

file, …

5. How to configure auto-created home directory for authenticated users

1. How to install PureFTP on SLES 11

To install the PureFTP on SLES 11, type yast –i

Page 2: CHEA Koemleang koemleang.chea@gmail · CHEA Koemleang koemleang.chea@gmail.com  By default, after installing the package, its service does not start automatically

CHEA Koemleang [email protected]

http://koemleang.wordpress.com

In Search Phrase, type pure and enter. Select the pure-ftpd and select Accept

This is the process of installing the Pure-ftpd

Page 3: CHEA Koemleang koemleang.chea@gmail · CHEA Koemleang koemleang.chea@gmail.com  By default, after installing the package, its service does not start automatically

CHEA Koemleang [email protected]

http://koemleang.wordpress.com

By default, after installing the package, its service does not start automatically. So, to start the

pure-ftpd service, type /etc/init.d/pure-ftpd start. Note that the configuration file of Pure-ftp is in

/etc/pure-ftpd/pure-ftpd.conf

2. How to allow Anonymous users to log in to the PureFTP

server, download and upload files

By default, the Anonymous users are allowed to log in to the Pure-ftp server and download files only.

Be noticed that all the anonymous users when they log in to the server, the directory that they log in

to is in /srv/ftp

Now, let’s log in to the Pure-ftp server by using Anonymous through FileZilla

Page 4: CHEA Koemleang koemleang.chea@gmail · CHEA Koemleang koemleang.chea@gmail.com  By default, after installing the package, its service does not start automatically

CHEA Koemleang [email protected]

http://koemleang.wordpress.com

To test whether the anonymous user can create directory, right-click � Create directory

Type the name for the new directory, click OK

Here is the result

Page 5: CHEA Koemleang koemleang.chea@gmail · CHEA Koemleang koemleang.chea@gmail.com  By default, after installing the package, its service does not start automatically

CHEA Koemleang [email protected]

http://koemleang.wordpress.com

To know whether anonymous user can upload file, drag and drop one file. It’ll show as below

And this result shows that the anonymous user can download files

Page 6: CHEA Koemleang koemleang.chea@gmail · CHEA Koemleang koemleang.chea@gmail.com  By default, after installing the package, its service does not start automatically

CHEA Koemleang [email protected]

http://koemleang.wordpress.com

To allow the Anonymous user to upload file, edit the pure-ftpd.conf

In line 282, “AnonymousCantUpload” change to no

Assign the permission chmod 747 /srv/ftp and restart the pure-ftpd by rcpure-ftpd restart

Page 7: CHEA Koemleang koemleang.chea@gmail · CHEA Koemleang koemleang.chea@gmail.com  By default, after installing the package, its service does not start automatically

CHEA Koemleang [email protected]

http://koemleang.wordpress.com

Drag and drop file into directory; it will show the successful result

To allow anonymous user to create directory, vim /etc/pure-ftpd/pure-ftpd.conf.

“AnonymousCanCreateDirs” change to yes and restart the service by rcpure-ftpd restart

Page 8: CHEA Koemleang koemleang.chea@gmail · CHEA Koemleang koemleang.chea@gmail.com  By default, after installing the package, its service does not start automatically

CHEA Koemleang [email protected]

http://koemleang.wordpress.com

Right-click � Create directory

Type the Name for the new directory and click OK

Here is the result

Page 9: CHEA Koemleang koemleang.chea@gmail · CHEA Koemleang koemleang.chea@gmail.com  By default, after installing the package, its service does not start automatically

CHEA Koemleang [email protected]

http://koemleang.wordpress.com

3. How to create Virtual Host for Anonymous users

Create the Virtual IP by vim /etc/sysconfig/network/ifcfg-eth0

Now, we create two Virtual IP address

Restart the Network by rcnetwork restart

Page 10: CHEA Koemleang koemleang.chea@gmail · CHEA Koemleang koemleang.chea@gmail.com  By default, after installing the package, its service does not start automatically

CHEA Koemleang [email protected]

http://koemleang.wordpress.com

Test the IP by ping 192.168.3.2 and ping 192.168.3.3

Now we create two directories: Virtual_1 and Virtual_2 and create the symbolic link as below

Create one file in each directory and then restart the pure-ftpd service

Page 11: CHEA Koemleang koemleang.chea@gmail · CHEA Koemleang koemleang.chea@gmail.com  By default, after installing the package, its service does not start automatically

CHEA Koemleang [email protected]

http://koemleang.wordpress.com

Now, access Pure-ftp server by different IP address. First access 192.168.3.2

Now access the Pure-ftp server by IP address 192.168.3.3

Page 12: CHEA Koemleang koemleang.chea@gmail · CHEA Koemleang koemleang.chea@gmail.com  By default, after installing the package, its service does not start automatically

CHEA Koemleang [email protected]

http://koemleang.wordpress.com

4. How to create FTP user account, allow user to create,

upload, download, rename file, …

First, create one user named ftpusers with the home directory

Create the ftp user as below

Create home directory for the user

Edit the pure-ftpd.conf

Allow authorized users to log in to the pure-ftp server

Page 13: CHEA Koemleang koemleang.chea@gmail · CHEA Koemleang koemleang.chea@gmail.com  By default, after installing the package, its service does not start automatically

CHEA Koemleang [email protected]

http://koemleang.wordpress.com

Enable Pureftp database

Change the ownership of the home directory to ftpusers and restart the pure-ftpd service

Now log in to the pure-ftp server by using the authorized users

To enable auto-create home directory of authorized user, edit the pure-ftpd.conf

Page 14: CHEA Koemleang koemleang.chea@gmail · CHEA Koemleang koemleang.chea@gmail.com  By default, after installing the package, its service does not start automatically

CHEA Koemleang [email protected]

http://koemleang.wordpress.com

Enable as below