From 5b44be244d8aa56c595b14067a657e5e272f92d6 Mon Sep 17 00:00:00 2001 From: lixz Date: Tue, 8 Jun 2021 10:52:32 +0800 Subject: [PATCH] sftpfs OpenFile perm --- sftpfs/sftp.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sftpfs/sftp.go b/sftpfs/sftp.go index c66ab475..eadf1e07 100644 --- a/sftpfs/sftp.go +++ b/sftpfs/sftp.go @@ -101,7 +101,8 @@ func (s Fs) OpenFile(name string, flag int, perm os.FileMode) (afero.File, error if err != nil { return nil, err } - return &File{fd: sshfsFile}, nil + err = sshfsFile.Chmod(perm) + return &File{fd: sshfsFile}, err } func (s Fs) Remove(name string) error {