“UbuntuHelp:FtpServer”的版本间的差异
来自Ubuntu中文
小 (新页面: {{From|https://help.ubuntu.com/community/FtpServer}} {{Languages|UbuntuHelp:FtpServer}} === How to setup an ftp server with three possible options. What am I talking about? === There are...) |
小 |
||
(未显示同一用户的2个中间版本) | |||
第2行: | 第2行: | ||
{{Languages|UbuntuHelp:FtpServer}} | {{Languages|UbuntuHelp:FtpServer}} | ||
=== How to setup an ftp server with three possible options. What am I talking about? === | === How to setup an ftp server with three possible options. What am I talking about? === | ||
− | |||
There are three different ways to set up an ftp server: | There are three different ways to set up an ftp server: | ||
− | |||
(1) * '''Anonymous FTP''' : | (1) * '''Anonymous FTP''' : | ||
− | |||
People can access the server only with the anonymous account and without a | People can access the server only with the anonymous account and without a | ||
password. Of course, the server administrator will set a limit for uploads to prevent users from putting illegal files like pirated music/films/games. | password. Of course, the server administrator will set a limit for uploads to prevent users from putting illegal files like pirated music/films/games. | ||
− | |||
(2) * '''FTP with both anonymous access and users with a passworded account''': | (2) * '''FTP with both anonymous access and users with a passworded account''': | ||
− | |||
This method lets both anonymous and passworded account users to enter the server. They will only have access to a specified directory, except for the user '''root''' who can view/modify/delete all files and/or folders. | This method lets both anonymous and passworded account users to enter the server. They will only have access to a specified directory, except for the user '''root''' who can view/modify/delete all files and/or folders. | ||
− | |||
(3) *'''FTP with mysql support for virtual users authentication''' : | (3) *'''FTP with mysql support for virtual users authentication''' : | ||
− | |||
This method allows access to the server only for some user groups that haven't got a virtual users authentication shell account on the system. It uses an external mysql server that stores user information. | This method allows access to the server only for some user groups that haven't got a virtual users authentication shell account on the system. It uses an external mysql server that stores user information. | ||
− | |||
=== First Option : Anonymous FTP === | === First Option : Anonymous FTP === | ||
− | |||
Before starting the creation of an anonymous ftp server, you have to add a user called ftp | Before starting the creation of an anonymous ftp server, you have to add a user called ftp | ||
into your system, with a home directory too. This step is really easy, just follow these commands: | into your system, with a home directory too. This step is really easy, just follow these commands: | ||
− | |||
<pre><nowiki> | <pre><nowiki> | ||
useradd -d /home/ftp/ftp -s /bin/false ftp | useradd -d /home/ftp/ftp -s /bin/false ftp | ||
第28行: | 第18行: | ||
mkdir -p /home/ftp/upload | mkdir -p /home/ftp/upload | ||
</nowiki></pre> | </nowiki></pre> | ||
− | |||
Doing this permits only this account to write in this folder. You can use more variables to specify what the ftp server will do. Here are some examples: | Doing this permits only this account to write in this folder. You can use more variables to specify what the ftp server will do. Here are some examples: | ||
− | |||
− | |||
* '''-e''' Allow access to the server only by anonymous users | * '''-e''' Allow access to the server only by anonymous users | ||
* '''-B''' Start the server with background demon | * '''-B''' Start the server with background demon | ||
第37行: | 第24行: | ||
* '''-M''' Let anonymous users create folders | * '''-M''' Let anonymous users create folders | ||
* '''-s''' ftp user files cannot be downloaded | * '''-s''' ftp user files cannot be downloaded | ||
− | |||
− | |||
=== Second Option : '''Both anonymous and passworded account users''' === | === Second Option : '''Both anonymous and passworded account users''' === | ||
− | |||
− | |||
To make it possible to have both anonymous and passworded account users in the same server, | To make it possible to have both anonymous and passworded account users in the same server, | ||
follow this small guide : | follow this small guide : | ||
− | |||
* '''-B ,-i ,M, -r, -s''' same of before | * '''-B ,-i ,M, -r, -s''' same of before | ||
* '''-u <uid>''' Enable users with a specified user id (uid) to access the server | * '''-u <uid>''' Enable users with a specified user id (uid) to access the server | ||
* '''-V <Ip address>''' Only specified IPs will be able to access the server in non-anonymous mode | * '''-V <Ip address>''' Only specified IPs will be able to access the server in non-anonymous mode | ||
− | |||
=== Third Option : '''Virtual Users with Mysql''' === | === Third Option : '''Virtual Users with Mysql''' === | ||
− | |||
To create a server with mysql support follow this steps : | To create a server with mysql support follow this steps : | ||
− | |||
* Download and install '''User Manager for PureFTPd''' which you can find here http://machiel.generaal.net/index.php?subject=user_manager_pureftpd | * Download and install '''User Manager for PureFTPd''' which you can find here http://machiel.generaal.net/index.php?subject=user_manager_pureftpd | ||
− | |||
* Decompress it and upload all its contents into your web server www directory and then write on your browser this link link http://localhost/ftp/install.php | * Decompress it and upload all its contents into your web server www directory and then write on your browser this link link http://localhost/ftp/install.php | ||
− | |||
* Follow all the steps that the installer asks to you | * Follow all the steps that the installer asks to you | ||
− | |||
* Copy and save rge pureftpd-mysql.conf into pureftpd user manager directory | * Copy and save rge pureftpd-mysql.conf into pureftpd user manager directory | ||
− | |||
* Done. Access to the administration panel using this link http://localhost/ftp | * Done. Access to the administration panel using this link http://localhost/ftp | ||
− | |||
− | |||
=== More options to add before launch the server process === | === More options to add before launch the server process === | ||
− | |||
* '''-c <num>''' Max client that can connect to the server | * '''-c <num>''' Max client that can connect to the server | ||
* '''-C <num>''' Max connections for a IP | * '''-C <num>''' Max connections for a IP | ||
第71行: | 第43行: | ||
* '''-n <MBytes>''' Max MB that a user can have into its home folder | * '''-n <MBytes>''' Max MB that a user can have into its home folder | ||
* '''-m <Cpu Loading>''' Stops the anonymous uploads if the cpu loading exceed from this value | * '''-m <Cpu Loading>''' Stops the anonymous uploads if the cpu loading exceed from this value | ||
− | |||
Thats all. | Thats all. | ||
− | |||
− | |||
[[category:UbuntuHelp]] | [[category:UbuntuHelp]] |
2009年5月12日 (二) 16:54的最新版本
目录
How to setup an ftp server with three possible options. What am I talking about?
There are three different ways to set up an ftp server: (1) * Anonymous FTP : People can access the server only with the anonymous account and without a password. Of course, the server administrator will set a limit for uploads to prevent users from putting illegal files like pirated music/films/games. (2) * FTP with both anonymous access and users with a passworded account: This method lets both anonymous and passworded account users to enter the server. They will only have access to a specified directory, except for the user root who can view/modify/delete all files and/or folders. (3) *FTP with mysql support for virtual users authentication : This method allows access to the server only for some user groups that haven't got a virtual users authentication shell account on the system. It uses an external mysql server that stores user information.
First Option : Anonymous FTP
Before starting the creation of an anonymous ftp server, you have to add a user called ftp into your system, with a home directory too. This step is really easy, just follow these commands:
useradd -d /home/ftp/ftp -s /bin/false ftp mkdir -p /home/ftp/upload
Doing this permits only this account to write in this folder. You can use more variables to specify what the ftp server will do. Here are some examples:
- -e Allow access to the server only by anonymous users
- -B Start the server with background demon
- -i Anonymous users can't upload files
- -M Let anonymous users create folders
- -s ftp user files cannot be downloaded
Second Option : Both anonymous and passworded account users
To make it possible to have both anonymous and passworded account users in the same server, follow this small guide :
- -B ,-i ,M, -r, -s same of before
- -u <uid> Enable users with a specified user id (uid) to access the server
- -V <Ip address> Only specified IPs will be able to access the server in non-anonymous mode
Third Option : Virtual Users with Mysql
To create a server with mysql support follow this steps :
- Download and install User Manager for PureFTPd which you can find here http://machiel.generaal.net/index.php?subject=user_manager_pureftpd
- Decompress it and upload all its contents into your web server www directory and then write on your browser this link link http://localhost/ftp/install.php
- Follow all the steps that the installer asks to you
- Copy and save rge pureftpd-mysql.conf into pureftpd user manager directory
- Done. Access to the administration panel using this link http://localhost/ftp
More options to add before launch the server process
- -c <num> Max client that can connect to the server
- -C <num> Max connections for a IP
- -T <bandwitdh> Max bandwitdh disponible for each connection
- -n <MBytes> Max MB that a user can have into its home folder
- -m <Cpu Loading> Stops the anonymous uploads if the cpu loading exceed from this value
Thats all.