fix: mkdir目录权限统一775

This commit is contained in:
TsMask
2024-05-27 10:29:04 +08:00
parent 6baae1862a
commit 4ac4fb55dc
10 changed files with 13 additions and 13 deletions

View File

@@ -314,7 +314,7 @@ func (s *SSHClientSFTP) CopyDirRemoteToLocal(remoteDir, localDir string) error {
}
// 创建本地目录
err = os.MkdirAll(localDir, 0755)
err = os.MkdirAll(localDir, 0775)
if err != nil {
logger.Errorf("CopyDirRemoteToLocal failed to creating local directory %s: => %s", localDir, err.Error())
return err
@@ -425,7 +425,7 @@ func (s *SSHClientSFTP) CopyFileRemoteToLocal(remotePath, localPath string) erro
}
defer remoteFile.Close()
if err := os.MkdirAll(filepath.Dir(localPath), 0750); err != nil {
if err := os.MkdirAll(filepath.Dir(localPath), 0775); err != nil {
return err
}