diff --git a/sdk/java/src/main/java/io/juicefs/JuiceFileSystemImpl.java b/sdk/java/src/main/java/io/juicefs/JuiceFileSystemImpl.java index a86076733bbf..74dc5611f43f 100644 --- a/sdk/java/src/main/java/io/juicefs/JuiceFileSystemImpl.java +++ b/sdk/java/src/main/java/io/juicefs/JuiceFileSystemImpl.java @@ -482,11 +482,12 @@ public void initialize(URI uri, Configuration conf) throws IOException { } } - uMask = FsPermission.getUMask(conf); String umaskStr = getConf(conf, "umask", null); if (!isEmpty(umaskStr)) { - uMask = new FsPermission(umaskStr); + conf.set("fs.permissions.umask-mode", umaskStr); + LOG.debug("override fs.permissions.umask-mode to {}", umaskStr); } + uMask = FsPermission.getUMask(conf); hflushMethod = getConf(conf, "hflush", "writeback"); initializeStorageIds(conf);