Skip to main content
Version: 4.4.1

SFTP/FTP activities overview

Arguments

IconActivityDescription
Close SFTP/FTP ConnectionCloses an open connection to an SFTP/FTP server.
Create FTP Connection ConfigurationCreates a set of properties needed to open a connection to an FTP server.
Create SFTP Connection ConfigurationCreates a set of properties needed to open a connection to an SFTP server.
Create SFTP/FTP Reader ConfigurationCreates a reader configuration to be used by the Start SFTP/FTP Reader activity.
Delete SFTP/FTP FileDeletes a file from an SFTP/FTP server.
Download SFTP/FTP File To StreamDownloads a file from an SFTP/FTP server.
Get Current SFTP/FTP DirectoryGet the current directory on an SFTP/FTP server.
Get Next SFTP/FTP FileRequests the next file from a started SFTP/FTP Reader.
List SFTP/FTP DirectoryLists the contents of a directory on an SFTP/FTP server.
Open Next SFTP/FTP FileRequests the next file from a started SFTP/FTP Reader and returns a stream of the downloaded file.
Open SFTP/FTP ConnectionOpens a connection to an SFTP/FTP server with the specified connection configuration.
Rename SFTP/FTP FileRenames a file on an SFTP/FTP server.
Send FTP CommandSends a command to an FTP server using the provided connection.
Set Current SFTP/FTP DirectorySets the current directory on the active SFTP/FTP server.
SFTP/FTP ReaderRegularly polls an SFTP or FTP directory for files, and matches the files against specified criteria. Files matching the criteria are downloaded.
SFTP/FTP Reader ExRegularly polls an SFTP or FTP directory for files, and matches the files against specified criteria. Files matching the criteria are downloaded to a stream.
SFTP/FTP Reader TemplateCreates the activities needed to monitor an SFTP/FTP server directory for files, matching a specified filter.
SFTP/FTP Reader Ex TemplateCreates the activities needed to monitor an SFTP/FTP server directory for files, matching a specified filter.
SFTP/FTP WriterWrites a file to an SFTP/FTP server and allows renaming of the file.
SFTP/FTP Writer ExWrites a stream to an SFTP/FTP server and allows renaming of the file.
Start SFTP/FTP ReaderStarts reading files from an SFTP/FTP server using the provided configuration and connection.
Stop SFTP/FTP ReaderStops reading file on an SFTP/FTP server using the provided subscription ID.
Upload SFTP/FTP File From StreamUploads a file to an SFTP/FTP server.

Remarks

SFTP/FTP activities may throw FtpException. For example, when connected to an FTP server and the server responds with an unaccepted response code, the ErrorCode property of the exception will contain the response code from the FTP server.

If an error occurs that is not generated by a response code from the server (for example, a socket error or SSL communication problem), a CommunicationException or another exception type such as SocketException may be thrown, depending on the nature of the error.

Below are lists of common FTP error codes. The list is provided for reference only, and is not necessarily complete.

100 Series

The requested action was initiated; expect another reply before proceeding with a new command.

CodeDescriptionDiscussion
110Restart marker reply.The text is exact and not left to the particular implementation; it must read "MARK yyyy = mmmm" where yyyy is User-process data stream marker, and mmmm server's equivalent marker (note the spaces between markers and "=").
120Service ready in nn minutes.(Informational)
125Data Connection already open; transfer starting.(Informational)
150File status okay; about to open data connection.FTP uses two ports: 21 for sending commands, and 20 for sending data. A status code of 150 indicates that the server is about to open a new connection on port 20 to send some data.

200 Series

The requested action has been successfully completed.

CodeDescriptionDiscussion
200Command okay.(Informational)
202Command not implemented, superfluous at this site.(Informational)
211System status, or system help reply.(Informational)
212Directory status.(Informational)
213File status.(Informational)
214Help message.(Informational)
215NAME system type.Where NAME is an official system name from the list in the Assigned Numbers document.
220Service ready for new user.(Informational)
221Service closing control connection.Logged out if appropriate.
225Data connection open; no transfer in progress.(Informational)
226Closing data connection.Requested file action successful (for example; file transfer or file abort). The command opens a data connection on port 20 to perform an action, such as transferring a file. This action successfully completes, and the data connection is closed.
227Entering Passive Mode.(h1,h2,h3,h4,p1,p2)
230User logged in, proceed. This status code appears after the client sends the correct password. It indicates that the user has successfully logged on.(Informational)
250Requested file action okay, completed.(Informational)
257"PATHNAME" created.(Informational)

300 Series

The command has been accepted, but the requested action is on hold, pending receipt of further information.

CodeDescriptionDiscussion
331User name okay, need password.You see this status code after the client sends a user name, regardless of whether the user name that is provided is a valid account on the system.
332Need account for login.Provide login credentials
350Requested file action pending further information.(Informational)

400 Series

The command was not accepted and the requested action did not take place, but the error condition is temporary and the action may be requested again.

CodeDescriptionDiscussion
421Error 421 Service not available, closing control connection. Error 421 User limit reached Error 421 You are not authorized to make the connection Error 421 Max connections reached Error 421 Max connections exceededThis can be a reply to any command if the service knows it must shut down. Try logging in later.
425Cannot open data connection.Change from PASV to PORT mode, check your firewall settings, or try to connect via HTTP.
426Connection closed; transfer aborted.The command opens a data connection to perform an action, but that action is canceled, and the data connection is closed. Try logging back in; contact your hosting provider to check if you need to increase your hosting account; try disabling the firewall on your PC to see if that solves the problem. If not, contact your hosting provider or ISP.
450Requested file action not taken.File unavailable (e.g., file busy). Try again later.
451Requested action aborted: local error in processing.Ensure command and parameters were typed correctly.
452Requested action not taken. Insufficient storage space in system.Ask FTP administrator to increase allotted storage space, or archive/delete remote files.

500 Series

The command was not accepted and the requested action did not take place.

CodeDescriptionDiscussion
500Syntax error, command unrecognized, command line too long.Try switching to passive mode.
501Syntax error in parameters or arguments.Verify your input; e.g., make sure there are no erroneous characters, spaces, etc.
502Command not implemented.The server does not support this command.
503Bad sequence of commands.Verify command sequence.
504Command not implemented for that parameter.Ensure entered parameters are correct.
530User not logged in.Ensure that you typed the correct user name and password combination. Some servers use this code instead of 421 when the user limit is reached
532Need account for storing files.Logged in user does not have permission to store files on remote server.
550Requested action not taken. File unavailable, not found, not accessible.Verify that you are attempting to connect to the correct server/location. The administrator of the remote server must provide you with permission to connect via FTP.
552Requested file action aborted. Exceeded storage allocation.More disk space is needed. Archive files on the remote server that you no longer need.
553Requested action not taken. File name not allowed.Change the file name or delete spaces/special characters in the file name.

See Also

SFTP - General information