Skip to main content
SajawalSultan
Silver ⭐️
February 24, 2021
Solved

Sqoop Import Permission Denied

sqoop import --connect "jdbc:jtds:sqlserver://BJHBLSNR:1496;useNTLMv2=true;domain=BST;databaseName=HTG" --username DM -P  --table PROVIDER_STG --split-by PROV_CODE_BK --target-dir /test/dd -m 1

 

 

 

 

ERROR tool.ImportTool: Import failed: org.apache.hadoop.security.AccessControlException: Permission denied: user=cloudera_user, access=WRITE, inode="/user":hdfs:supergroup:drwxr-xr-x

 

 

tusharkathpal
Gold ⭐️
February 25, 2021

Hello @SajawalSultan 

 

It seems you are running the job via user cloudera_user and it needs access to /user/<username> directory to create scratch directories which it is unable to create because user "cloudera_user" does not has permissions.

 

hdfs:supergroup:drwxr-xr-x /user

 

Run hdfs dfs -chmod 777 /user from hdfs user to ensure you get proper access to /user directory.

 

Let me know if this solves your sqoop import.

2 replies

tusharkathpal
Gold ⭐️
Gold ⭐️
February 25, 2021

Hello @SajawalSultan 

 

It seems you are running the job via user cloudera_user and it needs access to /user/<username> directory to create scratch directories which it is unable to create because user "cloudera_user" does not has permissions.

 

hdfs:supergroup:drwxr-xr-x /user

 

Run hdfs dfs -chmod 777 /user from hdfs user to ensure you get proper access to /user directory.

 

Let me know if this solves your sqoop import.

Translate
SajawalSultan
Silver ⭐️
February 28, 2021

Thanks, it's resolved. Appreciated very much

Translate