fix: 解决网站文件层级过多导致的授权超时问题 (#3451)

This commit is contained in:
zhengkunwang 2023-12-26 14:40:06 +08:00 committed by GitHub
parent 0b94524994
commit a6c681a429
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1413,7 +1413,7 @@ func (w WebsiteService) UpdateSitePermission(req request.WebsiteUpdateDirPermiss
if cmd.HasNoPasswordSudo() { if cmd.HasNoPasswordSudo() {
chownCmd = fmt.Sprintf("sudo %s", chownCmd) chownCmd = fmt.Sprintf("sudo %s", chownCmd)
} }
if out, err := cmd.ExecWithTimeOut(chownCmd, 1*time.Second); err != nil { if out, err := cmd.ExecWithTimeOut(chownCmd, 10*time.Second); err != nil {
if out != "" { if out != "" {
return errors.New(out) return errors.New(out)
} }