<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Need suggestion for shell script for sqoop in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Need-suggestion-for-shell-script-for-sqoop/m-p/243162#M204960</link>
    <description>&lt;P&gt;I am new to hortonworks . I have created a shell script with the Sqoop import command . I want to execute the .sh script to run the sqoop import command .&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;I have tried the following&lt;/U&gt; :&lt;/P&gt;&lt;P&gt;1. I have uploaded the .sh script in a folder /home/scripts/sqoop_test.sh&lt;/P&gt;&lt;P&gt;2. The permission : -rwxr-xr-x 1 root root 215 Jun 25 18:44 sqoop_test.sh&lt;/P&gt;&lt;P&gt;3. Then I tried to run the file : ./sqoop_test.sh&lt;/P&gt;&lt;P&gt;4. I am getting the error : Permission denied: user=root, access=WRITE, inode="/user":hdfs:hdfs:drwxr-xr-x&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;My query is&lt;/U&gt; :&lt;/P&gt;&lt;P&gt;1. Do I need to upload the .sh script in a folder within HDFS&lt;/P&gt;&lt;P&gt;2. How do I setup the permission for the script so that it runs successfully&lt;/P&gt;&lt;P&gt;3. How to execute .sh file from within hdfs so that I do not get the permission denied error&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 26 Jun 2019 00:08:43 GMT</pubDate>
    <dc:creator>rupakd</dc:creator>
    <dc:date>2019-06-26T00:08:43Z</dc:date>
    <item>
      <title>Need suggestion for shell script for sqoop</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Need-suggestion-for-shell-script-for-sqoop/m-p/243162#M204960</link>
      <description>&lt;P&gt;I am new to hortonworks . I have created a shell script with the Sqoop import command . I want to execute the .sh script to run the sqoop import command .&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;I have tried the following&lt;/U&gt; :&lt;/P&gt;&lt;P&gt;1. I have uploaded the .sh script in a folder /home/scripts/sqoop_test.sh&lt;/P&gt;&lt;P&gt;2. The permission : -rwxr-xr-x 1 root root 215 Jun 25 18:44 sqoop_test.sh&lt;/P&gt;&lt;P&gt;3. Then I tried to run the file : ./sqoop_test.sh&lt;/P&gt;&lt;P&gt;4. I am getting the error : Permission denied: user=root, access=WRITE, inode="/user":hdfs:hdfs:drwxr-xr-x&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;My query is&lt;/U&gt; :&lt;/P&gt;&lt;P&gt;1. Do I need to upload the .sh script in a folder within HDFS&lt;/P&gt;&lt;P&gt;2. How do I setup the permission for the script so that it runs successfully&lt;/P&gt;&lt;P&gt;3. How to execute .sh file from within hdfs so that I do not get the permission denied error&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2019 00:08:43 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Need-suggestion-for-shell-script-for-sqoop/m-p/243162#M204960</guid>
      <dc:creator>rupakd</dc:creator>
      <dc:date>2019-06-26T00:08:43Z</dc:date>
    </item>
    <item>
      <title>Re: Need suggestion for shell script for sqoop</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Need-suggestion-for-shell-script-for-sqoop/m-p/243163#M204961</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/114543/rupakd.html" nodeid="114543"&gt;@Rupak Dum&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1. Do I need to upload the .sh script in a folder within HDFS&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;No need to upload .sh script to HDFS/&lt;/P&gt;&lt;P&gt;If you upload script to HDFS then follow &lt;A rel="noopener noreferrer noopener noreferrer" href="https://community.hortonworks.com/questions/35610/executing-shell-script-in-hdfs.html" target="_blank"&gt;this&lt;/A&gt; link to execute shell script from HDFS.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2. How do I setup the permission for the script so that it runs successfully&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;You are running sqoop import as root user for this case you need to change the permissions in HDFS for /user directory.&lt;/P&gt;&lt;P&gt;Refer to &lt;A rel="noopener noreferrer noopener noreferrer" href="https://community.hortonworks.com/questions/10508/mkdir-permission-denied-userroot-accesswrite-inode.html" target="_blank"&gt;this&lt;/A&gt; and &lt;A rel="noopener noreferrer noopener noreferrer" href="https://community.hortonworks.com/questions/238960/permission-denied-useradmin-accesswrite-inodeuserh.html" target="_blank"&gt;this&lt;/A&gt; link for similar kind of thread.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;3. How to execute .sh file from within hdfs so that I do not get the permission denied error&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;change the permissions of&lt;STRONG&gt; /user&lt;/STRONG&gt; hdfs directory to 700 (or) 777, then you won't get any permission issues.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2019 00:51:50 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Need-suggestion-for-shell-script-for-sqoop/m-p/243163#M204961</guid>
      <dc:creator>Shu_ashu</dc:creator>
      <dc:date>2019-06-26T00:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: Need suggestion for shell script for sqoop</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Need-suggestion-for-shell-script-for-sqoop/m-p/243164#M204962</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/18929/yaswanthmuppireddy.html" nodeid="18929"&gt;@Shu&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thanks for your suggestion . I have changed the permission of the HDFS /user and the permission issue is gone and my sqoop command is running.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2019 01:32:16 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Need-suggestion-for-shell-script-for-sqoop/m-p/243164#M204962</guid>
      <dc:creator>rupakd</dc:creator>
      <dc:date>2019-06-26T01:32:16Z</dc:date>
    </item>
  </channel>
</rss>

