Skip to content

Commit

Permalink
Merge pull request #2464 from actiontech/up_pidfile_permission
Browse files Browse the repository at this point in the history
fix: up pidfile dir permission
  • Loading branch information
ColdWaterLW committed Jun 21, 2024
2 parents eef2294 + 5609dea commit e2c9b92
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sqle/driver/plugin_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit e2c9b92

Please sign in to comment.