Chinaunix首页 | 论坛 | 博客
  • 博客访问: 839179
  • 博文数量: 109
  • 博客积分: 650
  • 博客等级: 上士
  • 技术积分: 1483
  • 用 户 组: 普通用户
  • 注册时间: 2012-03-01 17:29
文章分类

全部博文(109)

文章存档

2016年(5)

2015年(21)

2014年(16)

2013年(38)

2012年(29)

分类: LINUX

2013-03-16 09:44:40


uname :check the name of your system;
rpm -ivh telnet.rpm:install the server soft
uname -a                cat  /etc/*release*   :check the unix release versions
rpm -qa | grep -i:查看已安装的rpm包
rpm -e ftp-0.17-17.i386 :卸载已安装的rpm包
##################################################
\\10.201.135.22
samba configure:

useradd username

smbpasswd -a username
设置密码
重启SMB服务器
service smb restart

 
###############################################
df :查看挂载的盘

rpm -ivh ftp-0.17-51.1.el6.x86_64.rpm :install ftp service

ftp 10.201.135.22  admin  #1024#wgjk meet the problem below

cannot change directory:/home/***

ftp服务器连接失败,错误提示:

500 OOPS: cannot change directory:/home/*******

500 OOPS: child died

resolve:


setsebool ftpd_disable_trans 1:could not help

getsebool -a :do not find the paraments ftpd_disable_trans

setsebool -P ftp_home_dir 1:got it


then it could mget,but could not put:

setsebool allow_ftpd_full_access on:got it

################################################################################



1、找到发行版光盘上的 telnet-server-xxx.rpm,安装好
2、ntsysv,把 telnet 和 xinted 选上,这样可以保证系统下次启动自动开启服务
3、service xinted start,来手动启动 telnet 服务(前提是 ntsysv 里面选择了 telnet)


telnet,配置

rpm -ivh telnet-0.17-47.el6.x86_64.rpm

rpm -ivh telnet-server-0.17-47.el6.x86_64.rpm

rpm -ivh xinetd-2.3.14-33.el6.x86_64.rpm:telnet守护进程,必须装

configure the file /etc/xinetd.d/telnet:  disable=yes→disable=no

service xinetd restart:start 守护进程

service iptables stop:stop the firewall.



4.修改telnet服务配置文件
vi /etc/xinetd.d/telnet 
service telnet
{
        disable         = yes
        flags           = REUSE
        socket_type = stream
        wait            = no
        user            = root
        server          = /usr/sbin/in.telnetd
        log_on_failure += USERID
}

将disable=yes行前加#,或者改为disable=no
PS:
安装telnet-server后,系统才有文件/usr/sbin/in.telnetd

5.重新启动xinetd守护进程
由于telnet服务也是由xinetd守护的,所以安装完telnet-server,要启动telnet服务就必须重新启动xinetd
[root@localhost root]#service xinetd restart

###############################################################################


有人建议整个关掉SELinux并且重启,于是我去/etc/selinux/config里面把SELinux给dis
able了。重启之后,发现可以在/home/sam/test这个文件夹上传了!


$ getsebool -a 部分内容如下,我怀疑以下内容与我遇到的问题有关:
allow_ftpd_anon_write --> off
#vsftpd.conf已经设置了anon_upload_enable=YES,和这里矛盾,很奇怪。
allow_ftpd_full_access --> off
#这个到底赋予了FTP用户多大的权限呢?

allow_ftpd_use_cifs --> off
allow_ftpd_use_nfs --> off

allow_httpd_anon_write --> off
allow_httpd_mod_auth_ntlm_winbind --> off
allow_httpd_mod_auth_pam --> off
allow_httpd_sys_script_anon_write --> off

ftp_home_dir --> on
ftpd_connect_db --> off

httpd_builtin_scripting --> on
httpd_can_check_spam --> off
httpd_can_network_connect --> off
httpd_can_network_connect_cobbler --> off
httpd_can_network_connect_db --> off
httpd_can_network_memcache --> off
httpd_can_network_relay --> off
httpd_can_sendmail --> off
httpd_dbus_avahi --> on
httpd_enable_cgi --> on

httpd_enable_ftp_server --> off
#我怀疑这个很关键,不知道是Apache自己有FTP服务还是怎样

httpd_enable_homedirs --> off
httpd_execmem --> off
httpd_read_user_content --> off
httpd_setrlimit --> off
httpd_ssi_exec --> off
httpd_tmp_exec --> off
httpd_tty_comm --> on
httpd_unified --> on
httpd_use_cifs --> off
httpd_use_gpg --> off
httpd_use_nfs --> off


/etc/vsftpd/vsftpd.conf 内容如下:

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=samftp

chroot_list_enable=YES
chroot_list_file=/etc/vsftpd/chroot_list
listen=YES

pam_service_name=vsftpd
userlist_enable=YES
userlist_deny=NO
userlist_file=/etc/vsftpd/user_list
tcp_wrappers=YES

local_root=/var/ftp/pub

local_max_rate=512000
max_clients=10
max_per_ip=5







阅读(822) | 评论(0) | 转发(0) |
0

上一篇:存储过程1

下一篇:算法1

给主人留下些什么吧!~~