From 5609deae1b43511c4018c0e7dcd007bb985ca464 Mon Sep 17 00:00:00 2001 From: iwanghc Date: Fri, 21 Jun 2024 13:20:57 +0800 Subject: [PATCH] fix: up pidfile dir permission --- sqle/driver/plugin_manager.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sqle/driver/plugin_manager.go b/sqle/driver/plugin_manager.go index fac0b7bb23..7a29b24e2c 100644 --- a/sqle/driver/plugin_manager.go +++ b/sqle/driver/plugin_manager.go @@ -183,7 +183,7 @@ func (pm *pluginManager) Start(pluginDir string, pluginConfigList []config.Plugi // kill plugins process residual and remove pidfile var wg sync.WaitGroup dir := GetPluginPidDirPath(pluginDir) - if err := os.MkdirAll(dir, 0644); err != nil { + if err := os.MkdirAll(dir, 0755); err != nil { return err } if err := filepath.Walk(dir, func(path string, info os.FileInfo, err error) error { @@ -369,7 +369,7 @@ func GetPluginPidFilePath(pluginDir string, pluginName string) string { } func WritePidFile(pidFilePath string, pid int64) error { - if err := os.MkdirAll(filepath.Dir(pidFilePath), 0644); err != nil { + if err := os.MkdirAll(filepath.Dir(pidFilePath), 0755); err != nil { return err } file, err := os.OpenFile(pidFilePath, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0644)