feat: 文件资源统一放到/usr/local/omc

This commit is contained in:
TsMask
2025-06-06 15:02:45 +08:00
parent 7c045fc036
commit c67fbb7998
8 changed files with 31 additions and 28 deletions

View File

@@ -83,7 +83,7 @@ func (s *NeActionController) PushFile(c *gin.Context) {
// 本地文件
localFilePath := file.ParseUploadFileAbsPath(body.UploadPath)
// 网元端临时目录
sshClient.RunCMD("mkdir -p /tmp/omc/push && sudo chmod 777 -R /tmp/omc")
sshClient.RunCMD("sudo mkdir -p /tmp/omc/push && sudo chmod 755 -R /tmp/omc")
neFilePath := filepath.ToSlash(filepath.Join("/tmp/omc/push", filepath.Base(localFilePath)))
// 复制到远程
if err = sftpClient.CopyFileLocalToRemote(localFilePath, neFilePath); err != nil {