unix ftp 配置经验
(2009-09-10 15:39:09)| 标签: ftpbinacsiipromptmgetgssftpvsftpselinux杂谈 | 分类: unix应用 | 
============================ftp
| ASCIIC出错 | 上传一个.TAR.GZ文件,然后tar不开,发现是上传时选择ASCII出错,应该选择BIN方式 | 
| BIN出错 | 今天cuteftp上传一个script文件到SUN,然后chmod 755,然后运行.发现出错. 后改用WINDOWS FTP COMMAND,设ASCII方式,就可以 | 
| ftp> prompt Interactive mode Off . | 
| scp
/home/daisy/full.tar.gz scp root@172.19.2.75:/home/root | 
| 系统会提示你输入172.19.2.75主机的root用户的登录密码 开始copy了 | 
输入 rz
| [root@blackcd tfn2000]# ls gogo | 
| [root@blackcd tfn2000]# rz | 
| rz waiting to
receive.奫root@blackcd tfn2000]# ls 3D.ico [root@blackcd tfn2000]# | 
====================================ftp server================================
要把xinet.d/下的gssftp文件中的"server_args
| vi /etc/xinetd.d/gssftp # description: The kerberized FTP server accepts FTP connections \ # service ftp { # # } | 
-  匿名用户形式:缺省vsftpd只提供匿名用户访问 
-  本地用户形式:以/etc/passwd中的用户名为认证方式 
-  虚拟用户形式(库用户):支持将用户名和口令保存在数据库文件或数据库服务器中。相对于FTP的本地用户形式来说,虚拟用户只是FTP服务器的专有用户,虚拟用户只能访问FTP服务器所提供的资源,这大大增强系统本身的安全性。 
| vi vsftpd.conf anonymous_enable=YES # # Uncomment this to allow local users to log in. #local_enable=YES | 
| [root@localhost vsftpd]#
/etc/init.d/vsftpd restart Shutting down vsftpd: [ Starting vsftpd for vsftpd: [ | 
| >ftp
192.168.1.12 Connected to 192.168.1.12. 220 (vsFTPd 2.0.3) User (192.168.1.12:(none)): macg 530 This FTP server is anonymous only. Login failed. | 
ftp://mirrors.kernel.org
匿名访问的用户名和密码都是ftp
上面的两行最终都能访问,而且显示的结果也完全一样
| # vi /etc/vsftpd/vsftpd.conf anonymous_enable=YES | 
| ftp用户都是用其shell home目录作为其ftp
目录 /etc/passwd 中的ftp 用户,就是 anonymous用户 # vi /etc/passwd ftp:x:14:50:FTP User:/home/macg:/sbin/nologin | 
| # /etc/rc.d/init.d/vsftpd restart Shutting down vsftpd: [ Starting vsftpd for vsftpd: [ | 
| # ftp 192.168.1.12 Connected to 192.168.1.12. 220 (vsFTPd 2.0.3) 530 Please login with USER and PASS. 530 Please login with USER and PASS. KERBEROS_V4 rejected as an authentication type Name (192.168.1.12:macg): anonymous 331 Please specify the password. Password: 230 Login successful. Remote system type is UNIX. Using binary mode to transfer files. ftp> ls 227 Entering Passive Mode (192,168,1,12,62,231) 150 Here comes the directory listing. drwxr-xr-x drwxr-xr-x -rw-r--r-- -rw-r--r-- drwxrwxr-x 226 Directory send OK. | 
| [root@localhost macg]# tail /var/log/audit/audit.log type=PATH msg=audit(1164774548.512:919222): item=0 name="12749615_272883.jpg" inode=1217307 dev=03:02 mode=040755 ouid=500 ogid=500 rdev=00:00 type=AVC msg=audit(1164774548.512:919222): avc: | 
| $ vi /etc/selinux/config SELINUX=disable SELINUXTYPE=targeted | 
| setsebool -P ftpd_disable_trans 1 | 
后一篇:apache 配置经验
					
 加载中…
加载中…