Write permission issue

I am getting below error with sqoop imports.

19/10/07 18:43:50 INFO mapreduce.Job: Job job_1570464366088_0040 failed with state FAILED due to: Job setup failed : org.apache.hadoop.security.AccessCon
trolException: Permission denied: user=mah11728, access=WRITE, inode="/sqoop_import/retail_db/orders/_temporary/1":hdfs:hdfs:drwxr-xr-x

I have tried to change the permissions as below, kindly suggest if i am missing out on something.

hadoop fs -chmod 777 sqoop_import/retail_db/orders

-ls output:

hadoop fs -ls sqoop_import/retail_db
Found 1 items

drwxrwxrwx - mah11728 mah11728 0 2019-10-04 18:21 sqoop_import/retail_db/orders

Thanks,

Could you share the command that you are using? Looks like it is trying to save data in /sqoop_import which is at top level?

1 Like

Hi @sgiri below is the command I am trying to run
sqoop import
–connect “jdbc:mysql://cxln2.c.thelab-240901.internal:3306/retail_db”
–username sqoopuser
–password ********
–table orders
–target-dir /sqoop_import/retail_db/orders

Thanks @sgiri I changed the last parameter
– target-dir sqoop_import/retail_db/orders

worked fine

1 Like