AIX host FTP to Linux server
1. Shell Script test.sh
#!/usr/bin/ksh
ftp-n<<!
Open 192.168.89.10
User Oracle Oracle
Binary
Cd/backup/exp/operation
Lcd/oratmp/exp
Prompt
Mput *
Close
Bye
Eof
2, the implementation of the foot of this newspaper wrong
$./test.sh
? Invalid command
Oops:cannot Change Directory:/home/oracle
Login failed.
Oops:not connected.
Local Directory Now/oratmp/exp
Interactive mode off.
Not connected.
Not connected.
$
3. Modify parameters on the Linux host
[Email protected] operation]# Sestatus-b | grep FTP
Allow_ftpd_anon_write off
Allow_ftpd_full_access off
Allow_ftpd_use_cifs off
Allow_ftpd_use_nfs off
Ftp_home_dir off
ftpd_connect_db off
Httpd_enable_ftp_server off
Tftp_anon_write off
[Email protected] operation]# setsebool-p Ftp_home_dir on
[Email protected] operation]# Sestatus-b | grep FTP
Allow_ftpd_anon_write off
Allow_ftpd_full_access off
Allow_ftpd_use_cifs off
Allow_ftpd_use_nfs off
Ftp_home_dir on
ftpd_connect_db off
Httpd_enable_ftp_server off
Tftp_anon_write off
[Email protected] operation]# service vsftpd restart
Shutting down VSFTPD: [OK]
Starting vsftpd for VSFTPD: [OK]
[Email protected] operation]#
4, also reported wrong
p560a:/oratmp/script#./test.sh
Local Directory Now/oratmp/exp
Interactive mode off.
Could not create file.
5. Continue to modify parameters
[Email protected] ~]# Vi/etc/sysconfig/selinux
# This file controls the state of the 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-no SELinux policy is loaded.
#SELINUX =enforcing
Selinux=disable
# selinuxtype= can take one of these the values:
# targeted-targeted processes is protected,
# Mls-multi level Security protection.
selinuxtype=targeted
[Email protected] ~]# setsebool-p allow_ftpd_full_access 1
[Email protected] ~]# service vsftpd restart
Shutting down VSFTPD: [OK]
Starting vsftpd for VSFTPD: [OK]
[Email protected] ~]#
6. Successful execution
p560a:/oratmp/script#./test.sh
Local Directory Now/oratmp/exp
Interactive mode off.
p560a:/oratmp/script#
This article is from the "Wheat Dock" blog, please make sure to keep this source http://yunlongzheng.blog.51cto.com/788996/1771660
AIX host FTP to Linux server where the bump record