分类: LINUX
2009-03-23 11:06:29
或
ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin
ftp:x:50:
[root@localhost ~]# yum install vsftpd
[root@localhost ~]# apt-get install vsftpd
[root@localhost ~]# rpm -ivh vsftpd*.rpm
[root@localhost ~]# tar zxvf vsftpd-2.0.3.tar.gz
[root@localhost ~]# cd vsftpd-2.0.3
[root@localhost ~]# make ;make install
[root@localhost ~]# cp vsftpd.conf /etc
listen=yes
[root@localhost ~]# /etc/init.d/xinetd restart
停止 xinetd: [ 确定 ]
启动 xinetd: [ 确定 ]
[root@localhost ~]# /usr/sbin/vsftpd &
[root@localhost ~]# /usr/local/sbin/vsftpd &
[root@localhost ~]# pgrep vsftpd
4248
[root@localhost ~]# pkill vsftpd
[root@localhost ~]# pgrep vsftpd
[root@localhost beinan]# /etc/init.d/vsftpd start
为 vsftpd 启动 vsftpd: [ 确定 ]
[root@localhost beinan]# /etc/init.d/vsftpd restart
关闭 vsftpd: [ 确定 ]
为 vsftpd 启动 vsftpd: [ 确定 ]
[root@localhost beinan]# /etc/init.d/vsftpd stop
关闭 vsftpd: [ 确定 ]
[root@localhost ~]# system-config-securitylevel-tui
[root@localhost beinan]# iptables -F
/etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
SELINUX=Disabled #这样就把SELINUX服务器关掉了,请重新启动系统;
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted
[root@localhost ~]# more /etc/passwd |grep ftp
ftp:x:1000:1000:FTP User:/var/ftp:/sbin/nologin
[root@localhost ~]# ls -ld /var/ftp
drwxrwxrwx 3 root root 4096 2005-03-23 /var/ftp
[root@localhost ~]# chown root:root /var/ftp
[root@localhost ~]# chmod 755 /var/ftp
anonymous_enable=YES
anon_upload_enable=YES
anon_mkdir_write_enable=YES
anon_umask=022
[root@localhost beinan]# finger ftp
Login: ftp Name: FTP User
Directory: /var/ftp Shell: /sbin/nologin
[root@localhost ~]# mkdir /var/ftp/pub
[root@localhost ~]# chmod 777 /var/ftp/pub
[root@localhost ~]# adduser -d /opt/beinan -g ftp -s /sbin/nologin beinan
[root@localhost ~]# passwd beinan
Changing password for user beinan.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
[root@localhost ~]#
local_enable=YES
write_enable=YES
local_umask=022
/home/a 映射为
/home/b/c 则为
[root@localhost ~]# mount --bind [原有的目录] [新目录]
[root@localhost ~]# mkdir /var/ftp/WinSoft
[root@localhost ~]# mount --bind /mnt/LinG/WinSoft /var/ftp/WinSoft
xferlog_file=/var/log/vsftpd.log
dirmessage_enable=YES
message_file=.message
--欢迎您来到LinuxSir FTP!
--在这里,您会得到最真诚的帮助;
--如果有什么问题和建议,请来信,多谢。
ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin
ftp:x:14:50:FTP User:/opt/ftp:/sbin/nologin
[root@localhost ~]# mkdir /opt/ftp
[root@localhost ~]# chmod 755 /opt/ftp
[root@localhost ~]# chown root:root /opt/ftp
max_clients=数字
max_per_ip=数字
max_clients=100
max_per_ip=5
anon_max_rate=数字
local_max_rate=数字
anon_max_rate=81920
local_max_rate=81920
#touch /etc/vsftpd.chroot_list
beinan
nanbei
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd.chroot_list
chroot_local_user=YES
listen_address=192.168.0.2