diff --git a/internal/service/model_upload.go b/internal/service/model_upload.go index 4c200f4..9d650be 100644 --- a/internal/service/model_upload.go +++ b/internal/service/model_upload.go @@ -148,6 +148,10 @@ type SFTP struct { // SkipDirectoryCreation will configure achgateway to create // directories on the remote server prior to uploading files. SkipDirectoryCreation bool + + // SkipChmodAfterUpload will not chmod files after uploading them. + // Some SFTP servers need uploads to be left alone once they're put on the server. + SkipChmodAfterUpload bool } func (cfg *SFTP) MarshalJSON() ([]byte, error) { diff --git a/internal/upload/sftp.go b/internal/upload/sftp.go index 7db6703..3ab7cab 100644 --- a/internal/upload/sftp.go +++ b/internal/upload/sftp.go @@ -58,6 +58,7 @@ func newSFTPTransferAgent(logger log.Logger, cfg *service.UploadAgent) (*SFTPTra PacketSize: cfg.SFTP.MaxPacketSize, SkipDirectoryCreation: cfg.SFTP.SkipDirectoryCreation, + SkipChmodAfterUpload: cfg.SFTP.SkipChmodAfterUpload, }) if err != nil { return nil, err