• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Access denied on folder using CFFTP getfile

New Here ,
Mar 20, 2014 Mar 20, 2014

Copy link to clipboard

Copied

I'm trying to use CFFTP to retrieve files from a remote FTP site to download to my local directory. I would see the file in the local directory but with 0 kb. Wondering what was going on, I tried accessing just the directory and got an 'Access is Denied' error.

The funny thing is that it was working fine a few weeks ago until we made some server changes. We had some FTP sites set up but closed them. Could closing them have anything to do with it? I'm definitely not an expert when it comes to this stuff.

We're using CF9 and IIS7 btw.

Can someone explain what's causing this and how do I go about fixing it? Any help would be appreicated.

<cfftp

    action="getFile"

    connection="objConnection"

    remotefile="s692605.FRTB0001_RES.DAT238710"

    localfile="E:\Inetpub\test\s692605.FRTB0001_RES.DAT238710"

    stoponerror="yes"

    failIfExists="false" passive="yes" timeout="600" transfermode="auto"  />

Views

1.0K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 26, 2014 Mar 26, 2014

Copy link to clipboard

Copied

It is important to open the connection, use / to access the root of the FTP server and to close the connection. Something along these lines:

<cfftp action = "open"

    username = "me_myself_and_I"

    password = "a1b2c3"

    connection = "objConnection" 

    server = "ftp.myDomain.com"

    port = "21"

    passive = "yes"

    stopOnError = "Yes">

    <cfftp     action="getFile"

            connection = "objConnection"

            remoteFile = "/s692605.FRTB0001_RES.DAT238710"

            localFile = "E:\Inetpub\test\s692605.FRTB0001_RES.DAT238710">

<cfftp action = "close"

    connection = "objConnection"

    stopOnError = "Yes">

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 30, 2014 Jun 30, 2014

Copy link to clipboard

Copied

LATEST

Sadly, I may be too late to help you, but for others hopefully this helps. I kept getting the same problem and it turns out it was because of the firewall on my dev computer that was doing it. I turned it off and the file actually sent instead of just showing 0KB.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation