Change default config file permissions to 644
This commit is contained in:
@@ -38,7 +38,7 @@ func (c *Config[T]) Get() (bool, error) {
|
|||||||
c.ConfigFile = &configFilepath
|
c.ConfigFile = &configFilepath
|
||||||
|
|
||||||
// open file, creating it if empty
|
// open file, creating it if empty
|
||||||
configFile, err := os.OpenFile(*c.ConfigFile, os.O_RDWR|os.O_CREATE, 0755)
|
configFile, err := os.OpenFile(*c.ConfigFile, os.O_RDWR|os.O_CREATE, 0644)
|
||||||
defer configFile.Close()
|
defer configFile.Close()
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -83,7 +83,7 @@ func (c *Config[T]) Write() error {
|
|||||||
return fmt.Errorf("Could not marshal config: %w", err)
|
return fmt.Errorf("Could not marshal config: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
configFile, err := os.OpenFile(*c.ConfigFile, os.O_RDWR, 0755)
|
configFile, err := os.OpenFile(*c.ConfigFile, os.O_RDWR, 0644)
|
||||||
defer configFile.Close()
|
defer configFile.Close()
|
||||||
|
|
||||||
_, err = configFile.Write(data)
|
_, err = configFile.Write(data)
|
||||||
|
|||||||
Reference in New Issue
Block a user