FTP下载文件失败
这几天的定时任务下载文件的脚本失败了。
于是手工执行测试,发现报550 Permission denied. Passive mode refused.
意思就是被动模式下,没有权限获取文件。
解决方案,在脚本中添加一行命令 passive,将被动模式关闭,即为主动模式。

附下载文件的shell脚本。
#!/bin/bash filename=$
ftp -niv xx.xx.xx.xx <<-EOF
user username password
binary
#服务器增加防火墙后,ftp请求已经修改为主动模式
passive
lcd /home/infa/
prompt
get $filename
close
bye
EOF
~
FTP下载文件失败的更多相关文章
- ftp下载文件失败get: Access failed: 550 Failed to open file. (t1.log)
get: Access failed: 550 Failed to open file. (t1.log) 原因是被SELinux安全访问控制策略限制了. 科普: SELinux(Security-E ...
- C#FTP下载文件出现远程服务器返回错误: (500) 语法错误,无法识别命令
如果下载多个文件的时候,有时候莫名其妙的出现500服务器错误,很有可能是没有设置KeepAlive 属性导致的. 出现应用程序未处理的异常:2015/1/6 11:40:56 异常类型:WebExce ...
- python从FTP下载文件
#!/usr/bin/python # -*- coding: utf-8 -*- """ FTP常用操作 """ from ftplib ...
- nginx反向代理下载文件失败处理
最近遇到了客户在从我们的服务器下载文件失败时的情况.然后把解决方案一并整理一下以备后续.需要说明的是,我们前端都是使用nginx来做反向代理,后面的逻辑处理采用php的方式. 1.缓存目录不可写 ng ...
- .Net 连接FTP下载文件报错:System.InvalidOperationException: The requested FTP command is not supported when using HTTP proxy
系统环境: Windows + .Net Framework 4.0 问题描述: C#连接FTP下载文件时,在部分电脑上有异常报错,在一部分电脑上是正常的:异常报错的信息:System.Inval ...
- c#.net从ftp下载文件到本地
c#.net从ftp下载文件到本地 /*首先从配置文件读取ftp的登录信息*/ ; ; , buffer_c ...
- php curl下载文件由于空格导致下载文件失败
<?php //$result=httpcopy('http://www.phpernote.com/image/logo.gif'); echo '<pre>';print_r($ ...
- (转)FTP操作类,从FTP下载文件
using System; using System.Collections.Generic; using System.Text; using System.IO; using System.Net ...
- java实现FTP下载文件
ftp上传下载文件,是遵照ftp协议上传下载文件的,本例仅以下载文件为例. 重要的方法解释: 1.FTP功能相关依赖路径:org.apache.commons.net.ftp.*: 2.ftp默认端口 ...
随机推荐
- C++基本数据类型总结
一.整形 1.整形有char.short.int.long.long long,这5个也默认为signed XX ; 规则:short至少16位:int至少和short一样:long至少32位,且至少 ...
- [LeetCode] Minimum Height Trees 最小高度树
For a undirected graph with tree characteristics, we can choose any node as the root. The result gra ...
- [LeetCode] Binary Tree Paths 二叉树路径
Given a binary tree, return all root-to-leaf paths. For example, given the following binary tree: 1 ...
- .NET跨平台之旅:corehost 是如何加载 coreclr 的
在前一篇博文中,在好奇心的驱使下,探秘了 dotnet run ,发现了神秘的 corehost —— 运行 .NET Core 应用程序的幕后英雄.有时神秘就是一种诱惑,神秘的 corehost ...
- 俄罗斯方块C#版
using System; using System.Windows.Forms; using System.Drawing; using System.Media; class me : Form ...
- Stream与byte[]与Image与string
public byte[] GetByteImage(Image img) { byte[] bt = null; if (!img.Equals(null)) { using (MemoryStre ...
- web前端面试试题总结---html篇
HTML Doctype作用?标准模式与兼容模式各有什么区别? (1).<!DOCTYPE>声明位于位于HTML文档中的第一行,处于 <html> 标签之前.告知浏览器的解析器 ...
- mysql的explain学习
explain是用来获取sql执行计划的信息. 上面是一个最简单的sql分析.下面来分析每列的意思. ①id ②select_type ③ table ④type ⑤possible_key ⑥ke ...
- Linq 单表城市级联
var list = (from province in db.Areas && province.IsDel == join city in db.Areas on province ...
- jquery.on()超级方法
$.on()方法是jquery1.7之后的一个超级方法,将事件绑定和事件委托整合到一个函数中去,支持绑定多个事件,并且可以绑定自定义事件.使用起来很方便. demo传送门 事件委托 首先说一下事件委托 ...