Pull request: all: rework file perms
Updates #3198. Squashed commit of the following: commit 3de1ecf4535220cdd769100ef0ea96c166419d12 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Fri May 28 18:39:52 2021 +0300 all: imp chlog commit f1a46efed917c9b70f047505449a816284d7c71e Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Fri May 28 18:13:55 2021 +0300 all: rework file perms
This commit is contained in:
@@ -559,6 +559,15 @@ func (f *Filtering) updateIntl(filter *filter) (updated bool, err error) {
|
||||
}
|
||||
}()
|
||||
|
||||
// Change the default 0o600 permission to something more acceptable by
|
||||
// end users.
|
||||
//
|
||||
// See https://github.com/AdguardTeam/AdGuardHome/issues/3198.
|
||||
err = tmpFile.Chmod(0o644)
|
||||
if err != nil {
|
||||
return updated, fmt.Errorf("changing file mode: %w", err)
|
||||
}
|
||||
|
||||
var reader io.Reader
|
||||
if filepath.IsAbs(filter.URL) {
|
||||
var f io.ReadCloser
|
||||
|
||||
Reference in New Issue
Block a user