vsftpd stands for 'very secure ftp daemon' there is plenty of documentation about this ftp daemon from their Homepage.
Anything beyond the initial install and startup is left up to you to figure out from their site since the configuration options are all documented there.
We will once again use YUM to install and this is another very easy process:
[root@unisys ~]# yum install vsftpd54cLinux联盟
Loading "installonlyn" plugin54cLinux联盟
Setting up Install Process54cLinux联盟
Setting up repositories54cLinux联盟
core 100% |========| 1.1 kB 00:0054cLinux联盟
updates 100% |========| 1.2 kB 00:0054cLinux联盟
extras 100% |========| 1.1 kB 00:0054cLinux联盟
Reading repository metadata in from local files54cLinux联盟
primary.xml.gz 100% |========| 1.9 MB 00:0454cLinux联盟
extras : ################################## 6118/611854cLinux联盟
Parsing package install arguments54cLinux联盟
Resolving Dependencies54cLinux联盟
--> Populating transaction set54cLinux联盟
with selected packages. Please wait.54cLinux联盟
---> Downloading header for vsftpd to54cLinux联盟
pack into transaction set.54cLinux联盟
vsftpd-2.0.5-8.i386.rpm 100% |====| 16 kB 00:0054cLinux联盟
---> Package vsftpd.i386 0:2.0.5-8 set to be updated54cLinux联盟
--> Running transaction check54cLinux联盟
Dependencies Resolved54cLinux联盟
Package Arch Version Repository Size54cLinux联盟
Installing:54cLinux联盟
vsftpd i386 2.0.5-8 core 137 k54cLinux联盟
Transaction Summary54cLinux联盟
Install 1 Package(s)54cLinux联盟
Update 0 Package(s)54cLinux联盟
Remove 0 Package(s)54cLinux联盟
Total download size: 137 k54cLinux联盟
Downloading Packages:54cLinux联盟
(1/1): vsftpd-2.0.5-8.i38 100%54cLinux联盟
|=====| 137 kB 00:0054cLinux联盟
Running Transaction Test54cLinux联盟
Finished Transaction Test54cLinux联盟
Transaction Test Succeeded54cLinux联盟
Running Transaction54cLinux联盟
Installing: vsftpd #### [1/1]54cLinux联盟
Installed: vsftpd.i386 0:2.0.5-854cLinux联盟
Complete!54cLinux联盟
[root@unisys ~]#54cLinux联盟
Now all that needs to be done is for it to be started!
[root@unisys ~]# service vsftpd start54cLinux联盟
Starting vsftpd for vsftpd: [ OK ]54cLinux联盟
[root@unisys ~]# 54cLinux联盟
54cLinux联盟
And thats it, you now have a FTP daemon running on your server, any user on the system (excluding root) can now login via FTP and be placed in their home directory, by default the daemon sets up a anonymous FTP with the docroot in /var/ftp/pub , if you want to serve files without authentication out ftp just place those files in /var/ftp/pub!
Enjoy!
-Scott D Harvanek scott.harvanek@fedoraproject.org
54cLinux联盟
然后我们创建一个ftp用户54cLinux联盟
#useradd ftpuser54cLinux联盟
然后修改密码54cLinux联盟
#passwd ftpuser54cLinux联盟
54cLinux联盟
密码修改完毕之后我们登录ftp服务器:54cLinux联盟
54cLinux联盟
# ftp 192.168.1.11154cLinux联盟
可是你却发现总是欻现:54cLinux联盟
500 OOPS: cannot change directory:/home/user54cLinux联盟
Login failed.54cLinux联盟
54cLinux联盟
下面我们来解决这一问题:54cLinux联盟
(2)查看ftp设置,将ftp_home_dir 选项打开54cLinux联盟
getsebool -a | grep ftp54cLinux联盟
setsebool -P ftp_home_dir on54cLinux联盟
getsebool -a | grep ftp
然后再来登录ftp服务器:54cLinux联盟
# ftp 192.168.1.11154cLinux联盟
Connected to 192.168.1.111.54cLinux联盟
220 Welcome to YBG's FTP service.54cLinux联盟
530 Please login with USER and PASS.54cLinux联盟
530 Please login with USER and PASS.54cLinux联盟
KERBEROS_V4 rejected as an authentication type54cLinux联盟
Name (192.168.1.111:root): ftpuser54cLinux联盟
331 Please specify the password.54cLinux联盟
Password:54cLinux联盟
230 Login successful.54cLinux联盟
Remote system type is UNIX.54cLinux联盟
Using binary mode to transfer files.54cLinux联盟
ftp> 54cLinux联盟
54cLinux联盟
好了,现在你就拥有一个服务器了,每当你在你的机器上用useradd添加一个用户的时候,你就可以通过这个用户名称来登录ftp服务器54cLinux联盟
54cLinux联盟
总结起来就 下面几点:54cLinux联盟
(1) 安装vsftpd
#yum install -y vsftpd
(2) 添加ftp用户,默认的root是不允许登录ftp服务器的
#useradd ftpuser
#passwd ftpuser
(3) 设定用户访问权限
# setsebool -P ftp_home_dir on
(4)启动vsftpd服务
# service vsftpd start54cLinux联盟
54cLinux联盟
至于更为复杂的用户权限设置以及其它的需求配置,可以在网上搜索,参阅相关的文档。54cLinux联盟
Linux联盟收集整理 ,转贴请标明原始链接,如有任何疑问欢迎来本站Linux论坛讨论