ftp

How to get a directories file size from an FTP protocol in a .NET application

淺唱寂寞╮ 提交于 2021-02-04 06:11:15
问题 I am currently making a small .NET console application to do an automateed backup of some of my files onto my server. The issue that I am running into is that I've had some bad weather on my end which led to some power and network outages. During this time I noticed that a good portion of my files didn't go through or got corrupt. I was wondering if there was a way to get a size of the folder on the other end and see if the file names, number of files, and total directory size match up. I've

Pure-ftp 安装配置

ⅰ亾dé卋堺 提交于 2021-02-01 04:02:51
配置yum源 备份(如有配置其他epel源) mv /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel.repo.backup mv /etc/yum.repos.d/epel-testing.repo /etc/yum.repos.d/epel-testing.repo.backup 下载新repo 到/etc/yum.repos.d/ wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo yum makecache yum install pure-ftpd -y vim /etc/pure-ftpd/pure-ftpd.conf PureDB /etc/pure-ftpd/pureftpd.pdb #去掉这行注释,指定路径 VerboseLog yes #开启日志 /var/log/pureftpd.log NoAnonymous yes #拒绝匿名用户登录 PassivePortRange 48000 50000 #使用被动模式,限制端口。(默认使用主动模式) 创建账户 groupadd ftpgroup useradd -g ftpgroup -s /sbin/nologin -d /dev/null ftpuser

Why would ftp_connect() return false on production server if it works elsewhere for connecting to the same FTP server?

泪湿孤枕 提交于 2021-01-29 04:35:51
问题 I have a script that uses ftp_connect() among other FTP PHP functions for uploading a file. ftp_connect() works when executed on my local development server for connecting to a remote FTP server. The same script, when executed on the remote server does not work for connecting to the exact same FTP server. Could somebody please point me in the right direction? Thanks! Here is the code: error_reporting(E_ERROR | E_WARNING | E_PARSE); $server = 'ftp.someserver.com'; $ftpConn = ftp_connect(

Schedule remote file download over FTP and process file in memory with Spring Integration

依然范特西╮ 提交于 2021-01-28 17:57:04
问题 I need to download a file from a remote FTP server every day and provide its contents to a class as an InputStream (or at least as byte[]) for further processing. Ideally I should also avoid any disk write. Can anyone give some advice on how to configure it with an XML or an annotation based configuration? 回答1: Spring Integration currently doesn't have a pre-configured adapter to 'stream' a file; it does, however, have an underlying component ( FtpRemoteFileTemplate ) that enables such access

Files are getting corrupted when download using ftp in java [duplicate]

雨燕双飞 提交于 2021-01-28 17:51:56
问题 This question already has answers here : FTP zip upload is corrupted sometimes (2 answers) Closed 2 years ago . Files are getting corrupted when I am trying to pull a compressed files. Here is the code I have used. I am not able to understand what I am going wrong. The format of files is .zip and inside it has XML files. After downloading it from remote server,XML files tags are changed and looks corrupted. public Boolean pullConfirmationsFTP(String host, String sftpUserName, String sftpPwd,

Files are getting corrupted when download using ftp in java [duplicate]

╄→尐↘猪︶ㄣ 提交于 2021-01-28 17:48:36
问题 This question already has answers here : FTP zip upload is corrupted sometimes (2 answers) Closed 2 years ago . Files are getting corrupted when I am trying to pull a compressed files. Here is the code I have used. I am not able to understand what I am going wrong. The format of files is .zip and inside it has XML files. After downloading it from remote server,XML files tags are changed and looks corrupted. public Boolean pullConfirmationsFTP(String host, String sftpUserName, String sftpPwd,

FTP details command doesn't seem to return the year the file was modified, is there a way around this?

强颜欢笑 提交于 2021-01-28 10:50:27
问题 I have a program that needs to download a file from ftp with the latest modified date. I have the usual code to connect and I use this method. request.Method = WebRequestMethods.Ftp.ListDirectoryDetails; The data that comes back looks like: -rw-r--r-- 1 myftp cats 1691090 Jan 6 20:52 somefile.zip There is no year component here so I can't use this date for comparison because it'll fail once we get to December and it rolls around to january. Any ideas? The FTP server is a 3rd party so I can't

Pipelines and git-ftp dirt repository error

一世执手 提交于 2021-01-28 09:22:19
问题 I am trying to use Pipelines with git-ftp to push files to my remote server. Error message: fatal: Dirty repository: Having uncommitted changes. Exiting... YML file: image: php:7.1.1 pipelines: default: - step: caches: - composer script: - apt-get update && apt-get install -y unzip - curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer - composer install - apt-get -qq install git-ftp - git ftp init --user USER --passwd PASSWORD ftp://user

C++/Win32 The basics of FTP security and using SSL

喜你入骨 提交于 2021-01-28 08:05:16
问题 My application downloads files from an FTP server. Using a packet sniffer I can see the user name and password easily, I would like to have this avoided. I can't make an FTP account with limited privileges ATM. How do I know if the server supports SSL? (Apache 2.x.x) Any other way to hide user : pass of FTP account? 回答1: If you want to see if a FTP server supports FTPS in explicit mode (RFC 2228, RFC 4217), then send an AUTH TLS . If it replies with a 5xx error code, then it doesn't; if it

Why does PHP ftp_connect fail when the server is running?

我只是一个虾纸丫 提交于 2021-01-28 06:59:00
问题 I've been trying to connect via FTP to my server for some time now and can't seem to get it to work. $connection_id = ftp_connect("example.com", 22); When running this code, it hangs for sometime until PHP eventually tells me the script has been executing for too long and quits. It does not fail and return FALSE. It just times out. My first instinct was that maybe the server was down, so I pinged it. The ping was successful and I didn't lose any packets. Then I tried using the same parameters