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

相关文章
|
8天前
|
安全 Linux 调度
在Linux中,如何实现,每星期天早8点服务器定时重启?
在Linux中,如何实现,每星期天早8点服务器定时重启?
|
8天前
|
网络协议 Linux Docker
在Linux中,如何指定dns服务器,来解析某个域名?
在Linux中,如何指定dns服务器,来解析某个域名?
|
8天前
|
存储 Ubuntu Linux
在Linux中,如何查看当前主机的主机名,如何修改主机名?要想重启后依旧生效,需要修改哪个配置文件?
在Linux中,如何查看当前主机的主机名,如何修改主机名?要想重启后依旧生效,需要修改哪个配置文件?
|
3天前
|
Linux
Linux 服务器下载百度网盘文件
本教程指导如何使用 `bypy` 库从百度网盘下载文件。首先通过 `pip install bypy` 安装库,接着运行 `bypy info` 获取登录链接并完成授权,最后将文件置于指定目录并通过 `bypy downdir /Ziya-13b-v1` 命令下载至本地。
14 1
Linux 服务器下载百度网盘文件
|
3天前
|
Shell Linux Perl
linux服务器自动生成本地快照
【8月更文挑战第28天】本文介绍了在Linux服务器上通过两种常见方式创建本地快照的方法:Btrfs文件系统与LVM。Btrfs原生支持快照功能,操作简单快捷;LVM则提供了灵活的逻辑卷管理,可在不影响原始数据的情况下创建快照。文章详细列出了创建、查看、挂载及清理快照的具体步骤,并提供了一个自动化的Shell脚本示例,便于用户根据需求定期创建快照并清理过期快照。
12 3
|
7天前
|
JavaScript Linux 应用服务中间件
【Azure 应用服务】FTP 部署 Vue 生成的静态文件至 Linux App Service 后,访问App Service URL依旧显示Azure默认页面问题
【Azure 应用服务】FTP 部署 Vue 生成的静态文件至 Linux App Service 后,访问App Service URL依旧显示Azure默认页面问题
|
8天前
|
Ubuntu Linux 测试技术
在Linux中,已知 apache 服务的访问日志按天记录在服务器本地目录/app/logs 下,由于磁盘空间紧张现在要求只能保留最近7天的访问日志,请问如何解决?
在Linux中,已知 apache 服务的访问日志按天记录在服务器本地目录/app/logs 下,由于磁盘空间紧张现在要求只能保留最近7天的访问日志,请问如何解决?
|
8天前
|
负载均衡 网络协议 Linux
在Linux中,常用WEB服务器负载架构有哪些?
在Linux中,常用WEB服务器负载架构有哪些?
|
8天前
|
安全 Linux 文件存储
在Linux中,服务器开不了机怎么解决⼀步步的排查?
在Linux中,服务器开不了机怎么解决⼀步步的排查?
|
8天前
|
存储 监控 网络协议
在Linux中,如何使用 tcpdump 监听主机为 192.168.1.1,tcp 端⼝为 80 的数据,并将将输出结果保存输出到tcpdump.log?
在Linux中,如何使用 tcpdump 监听主机为 192.168.1.1,tcp 端⼝为 80 的数据,并将将输出结果保存输出到tcpdump.log?
下一篇
云函数