Archived Forum Post

Index of archived forum posts

Question:

Error: Command rejected due to sftp proxy policy settings: SSH_FXP_OPENDIR

Dec 03 '12 at 09:53

I am trying to use your SFTP component to list the files in a directory.

When I call sftp.OpenDir("."), it comes back with null and the last error text is:

ChilkatLog:
  OpenDir:
    DllDate: Aug  5 2012
    UnlockPrefix: Anything for 30-day trial
    Username: chilkat
    Architecture: Little Endian; 64-bit
    Language: .NET 4.0 / x64
    VerboseLogging: 0
    SshVersion: SSH-2.0-sftp server
    SftpVersion: 3
    hcCurDate: Mon, 03 Dec 2012 14:37:07 +0000
    hcExpire: 7/2012
    path: .
    Sent FXP_OPENDIR
    StatusResponseFromServer:
      Request: FXP_OPENDIR
      InformationReceivedFromServer:
        StatusCode: 3
        StatusMessage: [2012/12/03 14:37:04.956] SSE2636 Command rejected due to sftp proxy policy settings: SSH_FXP_OPENDIR
      --InformationReceivedFromServer
    --StatusResponseFromServer
    Failed.
  --OpenDir
--ChilkatLog


Answer

This is not a problem with your application code, nor is it a problem with the Chilkat component. It's an issue with the SSH/SFTP server. For whatever reason, your user account's home directory does not have permission to access a directory listing. This problem can only be fixed at the server, either with the SSH server user account settings, or the filesystem permissions for the HOME directory.