Skip to content

Commit

Permalink
Merge pull request #241 from moov-io/sftp-skip-chmod-upload
Browse files Browse the repository at this point in the history
upload: pass SkipChmodAfterUpload for SFTP
  • Loading branch information
adamdecaf authored Jan 3, 2025
2 parents c3d677a + aeadb0d commit 3b664a4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/service/model_upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions internal/upload/sftp.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3b664a4

Please sign in to comment.