From e22c8ea0bd9b1670d4ab2bb4c810119f43f16f40 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Wed, 1 May 2019 18:29:06 +0200 Subject: tests: fix root_test permission issues The parent directories need execute all permissions. --- tests/root_test/root_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tests/root_test') 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) } -- cgit v1.2.3