Skip to content

Commit

Permalink
feat: 增加文件修改权限的超时时间 (1Panel-dev#4448)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhengkunwang223 authored Apr 9, 2024
1 parent 2ad8b37 commit 917f115
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/utils/files/file_op.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ func (f FileOp) ChownR(dst string, uid string, gid string, sub bool) error {
if cmd.HasNoPasswordSudo() {
cmdStr = fmt.Sprintf("sudo %s", cmdStr)
}
if msg, err := cmd.ExecWithTimeOut(cmdStr, 2*time.Second); err != nil {
if msg, err := cmd.ExecWithTimeOut(cmdStr, 10*time.Second); err != nil {
if msg != "" {
return errors.New(msg)
}
Expand All @@ -174,7 +174,7 @@ func (f FileOp) ChmodR(dst string, mode int64, sub bool) error {
if cmd.HasNoPasswordSudo() {
cmdStr = fmt.Sprintf("sudo %s", cmdStr)
}
if msg, err := cmd.ExecWithTimeOut(cmdStr, 2*time.Second); err != nil {
if msg, err := cmd.ExecWithTimeOut(cmdStr, 10*time.Second); err != nil {
if msg != "" {
return errors.New(msg)
}
Expand Down

0 comments on commit 917f115

Please sign in to comment.