Getting IBM i FTP Sessions to Work After an i 6.1 or 7.1 Upgrade

If you find that your FTP sessions are unable to transfer data after an i 6.1 or 7.1 OS upgrade, the problem may be in the way IBM changed FTP sessions for i 6.1 and above.


Starting with the IBM i 6.1 operating system and above (including i 7.1), IBM changed all FTP client attempts to send and receive data in Extended Passive Mode. This is a change from the default sending mode in i5/OS V5R4M0 and below.

What happens then is that after an i 6.1 or 7.1 operating system upgrade, you may see messages similar to the following during an FTP transfer and your sessions may fail to complete:

  • 500 ‘EPSV’: command not understood.
  • Unable to setup for an active data connection to the server, reason code 1
  • Use of EPSV disabled for this server session.

You may also receive an FTP550 error (Access Denied, Permission Denied, etc) and your session won’t be able to send or receive.

If you see these messages and your FTP session doesn’t complete, add the following FTP sub-command to your FTP script, immediately after the USER sub-command where your FTP session connects to the remote server.


SENDEPSV 0 sub-command turns off Extended Passive Mode sending for your IBM i FTP session.

This happened in my shop right after we upgraded a V5R4M0 box to i 6.1. Adding the SENDEPSV 0 command to our script solved the problem.

The issue is that the FTP server you’re talking to may not support Extended Passive Mode and that can cause a failure. Adding SENDEPSV o to your script will probably solve the issue.

This is also referenced in the System i – i5/OS Memo to Users Version 6 Release 1 (May 2011 update) publication.

Originally posted July 25, 2012. Reposted and updated March 3, 2014 to modify how to call the SENDEPSV 0 command

Thanks to Richard Downer for telling me about adding the ‘0’ parameter to the SENDEPSV FTP sub-command, in order to always force FTP Extendeed passive Mode off..


elephant seal

twitter iconjoe hertvik linkedin button

About Joe Hertvik

Joe is the owner of Hertvik Business Services, a service company providing written white papers, case studies, and other marketing content to computer industry companies. He is also a contributing editor for IT Jungle and has written the Admin Alert column for the past ten years. Follow Joe Hertvik on Twitter @JoeHertvik. Email Joe for a free quote on white papers, case studies, brochures, or other marketing materials.
This entry was posted in FTP, IBM i Tech Info, IBM i Tools and tagged , . Bookmark the permalink.

4 Responses to Getting IBM i FTP Sessions to Work After an i 6.1 or 7.1 Upgrade

  1. Pingback: IBM i QuickTip: IBM i 6.1 Fix for When You Can’t Start an FTP Session after a 6.1 Upgrade | Hertvik Business Services – Joe's Blog

  2. Pingback: IBM i QuickTip: Getting FTP Sessions to Work Af...

  3. Richard Downer says:

    You’re partly correct. “SENDEPSV” will toggle the current state. If it’s on, it turns off. But if it’s off, it turns on. If you want to force it off, type “SENDEPSV 0”; if you want to force it on, type “SENDEPSV 1”. This is important in scripts and instructions where you can’t be sure of the current state.

    • Joe Hertvik says:

      Excellent. Thank you, Richard. I appreciate the feedback. I changed the article to reflect the information your added about adding the ‘0’ parameter to the SENDEPSV FTP sub-command.

Comments are closed.