“UbuntuHelp:FtpServer/zh”的版本间的差异
来自Ubuntu中文
小 |
小 |
||
第19行: | 第19行: | ||
* '''-s''' 不能下载ftp用户文件 | * '''-s''' 不能下载ftp用户文件 | ||
− | === | + | === 第二种方式:匿名用户和密码用户并存: === |
要使匿名用户和密码用户都能访问服务器,见下面简要的指导: | 要使匿名用户和密码用户都能访问服务器,见下面简要的指导: |
2008年3月26日 (三) 08:22的版本
点击翻译: |
English • 中文 |
目录
3种不同使用方式下的ftp服务器的安装。这就下文要讨论的
有3种不同的方式安装ftp服务器: (1) * 匿名FTP :可以用不要密码的匿名帐号访问服务器。当然,服务器管理员可能会设定一些限制来防止用户上传一些非法文件,比如盗版的音乐/电影/游戏。 (2) * FTP既可匿名访问又可使用带密码的用户帐号: 这种方式使得匿名用户和密码用户都可以登录服务器。他们只能访问指定的文件夹, 只有root用户才能对所有的文件或文件夹进行读/改/删除的操作。(3) *'带mysql支持的'FTP对虚拟用户进行授权:这个方法对于那些没有获取虚拟用户授权的系统上的shell帐户,它们中仅有某些用户组能够访问服务器。它使用外部的mysql服务器来存储用户信息。
第一种方式:匿名FTP
在开始创建匿名ftp服务器之前,你需要向系统添加一个ftp用户,并带有一个主文件夹。这一步很简单,只要下面这些命令就可以了:
useradd -d /home/ftp/ftp -s /bin/false ftp mkdir -p /home/ftp/upload
对该文件夹进行授权,使得只有该用户对其是可写的。你可以使用指定ftp服务器更多的行为。下面列出几个例子:
- -e 只允许匿名用户访问服务器
- -B 以后台守护方式启动服务器
- -i 匿名用户不能上传文件
- -M 匿名用户可以创建文件夹
- -s 不能下载ftp用户文件
第二种方式:匿名用户和密码用户并存:
要使匿名用户和密码用户都能访问服务器,见下面简要的指导:
- -B ,-i ,M, -r, -s 同前面所介绍
- -u <uid> 指定用户id (uid)使得该用户可访问服务器
- -V <Ip address> 只有指定的IP才可以用非匿名方式访问
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.