Support Questions

Find answers, ask questions, and share your expertise

Sqoop Import Permission Denied

avatar
New Contributor
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

 

 

1 ACCEPTED SOLUTION

avatar
Expert Contributor

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.

View solution in original post

2 REPLIES 2

avatar
Expert Contributor

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.

avatar
New Contributor

Thanks, it's resolved. Appreciated very much