静下来,定好方向,好好干。
分类: LINUX
2008-07-22 20:23:27
ftp: 1. sudo chmod 755 /home/ftp
因为不允许ftp目录打开全部权限,其内部文件夹可以开放权限;
2. edit /etc/vsftpd.conf
listen=YES
anonymous_enable=YES
write_enable=YES (*注意)
anon_upload_enable=YES
anon_mkdir_write_enable=YES
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
secure_chroot_dir=/var/run/vsftpd
pam_service_name=vsftpd
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
///////////////////////////////////////////
3 配置实例
允许匿名FTP,允许上传,chroot用户目录,上传文件属主改为root
anonymous_enable=YES
local_enable=YES
write_enable=YES
local_umask=022
anon_upload_enable=YES
anon_mkdir_write_enable=YES
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
chown_uploads=YES
chown_username=root
xferlog_file=/var/log/vsftpd.log
xferlog_std_format=YES
pam_service_name=vsftpd
chroot_local_user=YES
/////////////////////////////////////////
3. sudo /etc/init.d/vsftpd restart
4. ftp 127.0.0.1 //anonymous
==============================================
telnet + xinetd
1. sudo vi /etc/xinetd.conf
# Simple configuration file for xinetd
#
# Some defaults, and include /etc/xinetd.d/
defaults
{
# Please note that you need a log_type line to be able to use log_on_success
# and log_on_failure. The default is the following :
# log_type = SYSLOG daemon info
instances = 60
log_type = SYSLOG authpriv
log_on_success = HOST PID
log_on_failure = HOST
cps = 25 30
}
includedir /etc/xinetd.d
2. sudo vi /etc/xinetd.d/telnet
# default: on
# description: The telnet server serves telnet sessions; it uses \
# unencrypted username/password pairs for authentication.
service telnet
{
disable = no
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/sbin/in.telnetd
log_on_failure += USERID
}
3.sudo /etc/init.d/xinetd restart