diff options
author | Jakob Unterwurzacher | 2019-05-01 18:29:06 +0200 |
---|---|---|
committer | Jakob Unterwurzacher | 2019-05-01 18:29:06 +0200 |
commit | e22c8ea0bd9b1670d4ab2bb4c810119f43f16f40 (patch) | |
tree | d72cfb805401d2513fa995c35e797cc363f7d83f /tests/root_test/root_test.go | |
parent | a97d14c42d902e53efdb42e9b32c4a39559fc262 (diff) |
tests: fix root_test permission issues
The parent directories need execute all permissions.
Diffstat (limited to 'tests/root_test/root_test.go')
-rw-r--r-- | tests/root_test/root_test.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/root_test/root_test.go b/tests/root_test/root_test.go index 3607f77..6526fd2 100644 --- a/tests/root_test/root_test.go +++ b/tests/root_test/root_test.go @@ -39,10 +39,14 @@ func TestSupplementaryGroups(t *testing.T) { t.Skip("must run as root") } cDir := test_helpers.InitFS(t) + os.Chmod(cDir, 0755) pDir := cDir + ".mnt" test_helpers.MountOrFatal(t, cDir, pDir, "-allow_other", "-extpass=echo test") defer test_helpers.UnmountPanic(pDir) + // We need an unrestricted umask + syscall.Umask(0000) + dir1 := pDir + "/dir1" err := os.Mkdir(dir1, 0770) if err != nil { @@ -53,7 +57,7 @@ func TestSupplementaryGroups(t *testing.T) { t.Fatal(err) } - err = asUser(1235, 1235, []int{1234}, func() error { return os.Mkdir(dir1+"/foo", 0700) }) + err = asUser(1235, 1235, []int{1234}, func() error { return os.Mkdir(dir1+"/dir2", 0700) }) if err != nil { t.Error(err) } |