How to set file permissions after uploading a file via SFTP?

How to set file permissions after uploading a file via SFTP?

File permissions shall be set by specifying in File Transfer Task Editor > AdditionalOptions > permissions=[number]. 
The [number] is calculated as a sum of the selected enumeration items for SFTP permissions. See below an example that corresponds to a CHMOD 777 command for Unix-based servers:



In the above example "permissions=511" the [number] is specified to 511.

The number 511 is based on (sum of) the following enumeration and means that Others, Group and Owner can Read/Execute/Write:

  [Flags]

  public enum SftpPermissions

  {

    OthersExecute = 1,
    OthersWrite = 2,
    OthersRead = 4,
    GroupExecute = 8,
    GroupWrite = 16,
    GroupRead = 32,
    OwnerExecute = 64,
    OwnerWrite = 128,
    OwnerRead = 256,
    Sticky = 512,
    SetGid = 1024,
    SetUid = 2048,

  }

    Book a Presales Call


    Are you new to COZYROC and evaluating our solutions? 
    Book a Presales Call with us now and get 5% off SSIS+.