diff --git a/guava-tests/test/com/google/common/io/MoreFilesTest.java b/guava-tests/test/com/google/common/io/MoreFilesTest.java index 4bde486ed3c0..69310d394579 100644 --- a/guava-tests/test/com/google/common/io/MoreFilesTest.java +++ b/guava-tests/test/com/google/common/io/MoreFilesTest.java @@ -300,6 +300,9 @@ public void testCreateParentDirectories_noPermission() { if (isWindows()) { return; // TODO: b/136041958 - Create/find a directory that we don't have permissions on? } + if ("root".equals(System.getProperty("user.name"))) { + return; // Root bypasses filesystem permission checks, so the test expectation doesn't hold. + } Path file = root().resolve("parent/nonexistent.file"); Path parent = file.getParent(); assertFalse(Files.exists(parent));