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,如需转载请自行联系原作者

目录
打赏
0
0
0
0
69
分享
相关文章
Prometheus+Grafana监控Linux主机
通过本文的步骤,我们成功地在 Linux 主机上使用 Prometheus 和 Grafana 进行了监控配置。具体包括安装 Prometheus 和 Node Exporter,配置 Grafana 数据源,并导入预设的仪表盘来展示监控数据。通过这种方式,可以轻松实现对 Linux 主机的系统指标监控,帮助及时发现和处理潜在问题。
328 7
在Linux中,如何查看当前主机的主机名,如何修改主机名?要想重启后依旧生效,需要修改哪个配置文件?
在Linux中,如何查看当前主机的主机名,如何修改主机名?要想重启后依旧生效,需要修改哪个配置文件?
深入解析与防范:基于缓冲区溢出的FTP服务器攻击及调用计算器示例
本文深入解析了利用缓冲区溢出漏洞对FTP服务器进行远程攻击的技术,通过分析FreeFlow FTP 1.75版本的漏洞,展示了如何通过构造过长的用户名触发缓冲区溢出并调用计算器(`calc.exe`)。文章详细介绍了攻击原理、关键代码组件及其实现步骤,并提出了有效的防范措施,如输入验证、编译器保护和安全编程语言的选择,以保障系统的安全性。环境搭建基于Windows XP SP3和Kali Linux,使用Metasploit Framework进行攻击演示。请注意,此内容仅用于教育和研究目的。
124 4
如何配置Linux端的ftp?
如何配置Linux端的ftp?
200 64
Linux虚拟机与主机和Xshell的连接问题解决
Linux虚拟机与主机和Xshell的连接问题解决
240 1
主机host服务器和Docker容器之间的文件互传方法汇总
Docker 成为前端工具,可实现跨设备兼容。本文介绍主机与 Docker 容器/镜像间文件传输的三种方法:1. 构建镜像时使用 `COPY` 或 `ADD` 指令;2. 启动容器时使用 `-v` 挂载卷;3. 运行时使用 `docker cp` 命令。每种方法适用于不同场景,如静态文件打包、开发时文件同步及临时文件传输。注意权限问题、容器停止后的文件传输及性能影响。
1395 0
【Azure 应用服务】FTP 部署 Vue 生成的静态文件至 Linux App Service 后,访问App Service URL依旧显示Azure默认页面问题
【Azure 应用服务】FTP 部署 Vue 生成的静态文件至 Linux App Service 后,访问App Service URL依旧显示Azure默认页面问题

热门文章

最新文章

AI助理

你好,我是AI助理

可以解答问题、推荐解决方案等