mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-31 14:08:06 +08:00
feat: 应用安装适配 sftpgo pgadmin4 (#1819)
This commit is contained in:
parent
0f6e14d2f9
commit
df770460d6
@ -530,11 +530,15 @@ func copyData(app model.App, appDetail model.AppDetail, appInstall *model.AppIns
|
||||
|
||||
// 处理文件夹权限等问题
|
||||
func upAppPre(app model.App, appInstall *model.AppInstall) error {
|
||||
if app.Key == "nexus" {
|
||||
dataPath := path.Join(appInstall.GetPath(), "data")
|
||||
if err := files.NewFileOp().Chown(dataPath, 200, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
fileOp := files.NewFileOp()
|
||||
switch app.Key {
|
||||
case "nexus":
|
||||
return fileOp.Chown(dataPath, 200, 0)
|
||||
case "sftpgo":
|
||||
return files.NewFileOp().Chown(dataPath, 1000, 1000)
|
||||
case "pgadmin4":
|
||||
return files.NewFileOp().Chown(dataPath, 5050, 5050)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user