diff --git a/kyuubi-server/src/main/scala/org/apache/kyuubi/engine/spark/SparkProcessBuilder.scala b/kyuubi-server/src/main/scala/org/apache/kyuubi/engine/spark/SparkProcessBuilder.scala index 552c495523a..7c862f52180 100644 --- a/kyuubi-server/src/main/scala/org/apache/kyuubi/engine/spark/SparkProcessBuilder.scala +++ b/kyuubi-server/src/main/scala/org/apache/kyuubi/engine/spark/SparkProcessBuilder.scala @@ -284,6 +284,9 @@ class SparkProcessBuilder( .replace("{{DAY}}", today.format(DAY_FMT)) if (conf.get(KUBERNETES_SPARK_AUTO_CREATE_FILE_UPLOAD_PATH)) { + // Create the `uploadPath` using permission 777, otherwise, spark just creates the + // `$uploadPath/spark-upload-$uuid` using default permission 511, which might prevent + // other users from creating the staging dir under `uploadPath` later. val hadoopConf = KyuubiHadoopUtils.newHadoopConf(conf, loadDefaults = false) val path = new Path(uploadPath) var fs: FileSystem = null