Spark write to memory error

I have a data frame for a streaming job created as shown below

purchase_by_hour = retail_stream.selectExpr("CustomerId",
"(UnitPrice * Quantity) as total_cost",
"InvoiceDate") \
.groupBy(col("CustomerId"),window(col("InvoiceDate"),"1 day")) \
.sum("total_cost")

But, when I try to write it as a stream, as shown in the snippet below, I get a ‘Permission denied’ error.

purchase_by_hour.writeStream.format(“memory”).queryName(“hourly_customer_purchases”).outputMode(“complete”).start()

error:

Py4JJavaError: An error occurred while calling o87.start.
: org.apache.hadoop.security.AccessControlException: Permission denied: user=itv654347, access=WRITE, inode="/tmp":hdfs:supergroup:drwxrwx--x