AIX主机FTP到LINUX服务器其中的磕碰记录

简介:

AIX主机FTP到LINUX服务器

1、SHELL脚本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、执行脚本报错

$ ./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、在LINUX主机上修改参数

[root@L-AP-89-10 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

[root@L-AP-89-10 operation]# setsebool -P  ftp_home_dir  on

[root@L-AP-89-10 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

[root@L-AP-89-10 operation]# service vsftpd restart

Shutting down vsftpd:                                      [  OK  ]

Starting vsftpd for vsftpd:                                [  OK  ]

[root@L-AP-89-10 operation]# 


4、还报错

P560A:/oratmp/script#./test.sh

Local directory now /oratmp/exp

Interactive mode off.

Could not create file.


5、继续修改参数

[root@L-AP-89-10 ~]# vi /etc/sysconfig/selinux

# 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 - No SELinux policy is loaded.

#SELINUX=enforcing

SELINUX=disable

# SELINUXTYPE= can take one of these two values:

#     targeted - Targeted processes are protected,

#     mls - Multi Level Security protection.

SELINUXTYPE=targeted

 

[root@L-AP-89-10 ~]# setsebool -P allow_ftpd_full_access 1

[root@L-AP-89-10 ~]# service vsftpd restart

Shutting down vsftpd:                                      [  OK  ]

Starting vsftpd for vsftpd:                                [  OK  ]

[root@L-AP-89-10 ~]# 


6、成功执行

P560A:/oratmp/script#./test.sh

Local directory now /oratmp/exp

Interactive mode off.

P560A:/oratmp/script#



本文转自zylhsy 51CTO博客,原文链接:http://blog.51cto.com/yunlongzheng/1771660,如需转载请自行联系原作者

相关文章
|
10天前
|
Java Linux
Springboot 解决linux服务器下获取不到项目Resources下资源
Springboot 解决linux服务器下获取不到项目Resources下资源
|
13天前
|
Linux
linux下搭建tftp服务器教程
在Linux中搭建TFTP服务器,需安装`tftp-server`(如`tftpd-hpa`)。步骤包括:更新软件包列表,安装`tftpd-hpa`,启动并设置开机自启,配置服务器(编辑`/etc/default/tftpd-hpa`),添加选项,然后重启服务。完成后,可用`tftp`命令进行文件传输。例如,从IP`192.168.1.100`下载`file.txt`: ``` tftp 192.168.1.100 &lt;&lt;EOF binary put file.txt quit EOF ```
28 4
|
28天前
|
监控 安全 Shell
【Shell 命令集合 文件传输 】Linux 将文件传送到远端的UUCP主机 uuto命令使用指南
【Shell 命令集合 文件传输 】Linux 将文件传送到远端的UUCP主机 uuto命令使用指南
30 0
|
28天前
|
网络协议 Shell Linux
【Shell 命令集合 网络通讯 】⭐⭐⭐Linux 测试与目标主机之间的网络连接ping 命令 使用指南
【Shell 命令集合 网络通讯 】⭐⭐⭐Linux 测试与目标主机之间的网络连接ping 命令 使用指南
41 1
|
28天前
|
Linux Shell 网络安全
【Shell 命令集合 网络通讯 】Linux 与SMB服务器进行交互 smbclient命令 使用指南
【Shell 命令集合 网络通讯 】Linux 与SMB服务器进行交互 smbclient命令 使用指南
40 1
|
30天前
|
域名解析 存储 网络协议
Linux中搭建主从DNS服务器
搭建主从DNS架构以提升DNS服务的高可用性、负载均衡和数据冗余。主服务器配置涉及编辑`/etc/named.conf`,设置监听IP和允许查询的范围,并定义主区域及允许的数据传输。从服务器配置需指定为奴隶类型,并指明主服务器的IP。测试表明正反向查询解析均正常。注意配置文件的语法正确性和权限设置。
|
6天前
|
Linux 数据安全/隐私保护
Linux基础与服务器架构综合小实践
【4月更文挑战第9天】Linux基础与服务器架构综合小实践
1191 6
|
17天前
|
Ubuntu Linux 虚拟化
【Linux】ubuntu安装samba服务器
【Linux】ubuntu安装samba服务器
|
18天前
|
Linux
Linux安装bind9搭建自己的域名服务器
Linux安装bind9搭建自己的域名服务器
11 0
|
20天前
|
网络协议 Linux 网络安全
Linux服务器DNS服务器配置实现bind的正向解释和反向解释
Linux服务器DNS服务器配置实现bind的正向解释和反向解释
17 0

热门文章

最新文章