Access permission required to saveFile in spark

Trying: dailyRevenuePerProductName.saveAsTextFile("/home/amitj_1804/daily_revenue_per_productName")

Getting below error:

Caused by: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.AccessControlException): Permission denied: user=amitj_1804, access=WRITE, inode="/home/amitj_1804/daily_revenue_per_productName/_temporary/0":hdfs:hdfs:drwxr-xr-x

Hi @Amit_Jain,

To save the spark output please try to use your hdfs location which is /user/username/../
i.e
dailyRevenuePerProductName.saveAsTextFile("/user/username/.../")