Use same permission mask

This commit is contained in:
Ingo Oppermann 2023-07-19 17:41:02 +02:00
parent 1f24ea1b00
commit 97a8e0f815
No known key found for this signature in database
GPG Key ID: 2AB32426E9DD229E
7 changed files with 8 additions and 8 deletions

View File

@ -47,7 +47,7 @@ func Location(filepath string) string {
configfile = "./config/config.js"
}
os.MkdirAll(path.Dir(configfile), 0740)
os.MkdirAll(path.Dir(configfile), 0755)
return configfile
}

View File

@ -42,7 +42,7 @@ func (u *MustDir) Validate() error {
return fmt.Errorf("path name must not be empty")
}
if err := u.fs.MkdirAll(val, 0750); err != nil {
if err := u.fs.MkdirAll(val, 0755); err != nil {
return fmt.Errorf("%s can't be created (%w)", val, err)
}

View File

@ -519,7 +519,7 @@ func TestFilesystemsPurgeCache(t *testing.T) {
memfs, err := fs.NewMemFilesystem(fs.MemConfig{})
require.NoError(t, err)
memfs.MkdirAll("/path", 0744)
memfs.MkdirAll("/path", 0755)
cache, err := cache.NewLRUCache(cache.LRUConfig{
TTL: 5 * time.Minute,

View File

@ -196,7 +196,7 @@ func NewRootedDiskFilesystem(config RootedDiskConfig) (Filesystem, error) {
fs.root = root
}
err := os.MkdirAll(fs.root, 0700)
err := os.MkdirAll(fs.root, 0755)
if err != nil {
return nil, err
}

View File

@ -16,7 +16,7 @@ import (
var ErrNoMinio = errors.New("minio binary not found")
func startMinio(t *testing.T, path string) (*exec.Cmd, error) {
err := os.MkdirAll(path, 0700)
err := os.MkdirAll(path, 0755)
require.NoError(t, err)
minio, err := exec.LookPath("minio")
@ -255,7 +255,7 @@ func testFiles(t *testing.T, fs Filesystem) {
require.Equal(t, int64(1), fs.Files())
fs.MkdirAll("/path/to/foo", 0777)
fs.MkdirAll("/path/to/foo", 0755)
require.Equal(t, int64(1), fs.Files())

View File

@ -26,7 +26,7 @@ func TestReadOnly(t *testing.T) {
_, _, err = ro.WriteFileSafe("/readonly.go", []byte("foobar"))
require.Error(t, err)
err = ro.MkdirAll("/foobar/baz", 0700)
err = ro.MkdirAll("/foobar/baz", 0755)
require.Error(t, err)
res := ro.Remove("/readonly.go")

View File

@ -903,7 +903,7 @@ func validateConfig(config *app.Config, fss []rfs.Filesystem, ffmpeg ffmpeg.FFmp
}
dir := filepath.Dir(strings.TrimPrefix(io.Address, "file:"+basedir))
fs.MkdirAll(dir, 0744)
fs.MkdirAll(dir, 0755)
}
}