fix: 远程网元文件目录权限775

This commit is contained in:
TsMask
2024-05-14 17:25:44 +08:00
parent 3f489c7bfc
commit 7e3ab83f18
3 changed files with 4 additions and 4 deletions

View File

@@ -166,7 +166,7 @@ func (r *NeLicenseImpl) UploadLicense(neLicense model.NeLicense) error {
neLicensePath := fmt.Sprintf("/usr/local/etc/%s/license/system.ini", neTypeLower)
neLicenseDir := filepath.ToSlash(filepath.Dir(neLicensePath))
// 修改网元文件权限
sshClient.RunCMD(fmt.Sprintf("sudo chmod o+w %s && sudo chmod o+w %s", neLicenseDir, neLicensePath))
sshClient.RunCMD(fmt.Sprintf("sudo chmod 775 %s && sudo chmod o+w %s", neLicenseDir, neLicensePath))
// 尝试备份授权文件
neLicensePathBack := fmt.Sprintf("%s/system_%s.ini", neLicensePath, time.Now().Format("20060102_150405"))