<?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>topic Re: run scripts in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/run-scripts/m-p/2560210#M872818</link>
    <description>Is the full path in the cron script ?&lt;BR /&gt;Instead of ./test in your script do  /home/whatever/scripts/test&lt;BR /&gt;and test has to have execute premissions.&lt;BR /&gt;Try chmod 777 test  but this will make this script executable by everyone. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Richard</description>
    <pubDate>Thu, 23 Aug 2001 19:25:43 GMT</pubDate>
    <dc:creator>someone_4</dc:creator>
    <dc:date>2001-08-23T19:25:43Z</dc:date>
    <item>
      <title>run scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/run-scripts/m-p/2560198#M872806</link>
      <description>Hi All!&lt;BR /&gt;what's I user need to do when I try to run a scripts and get the following error:&lt;BR /&gt; sh: ./test.sh: Execute permission denied.</description>
      <pubDate>Wed, 01 Aug 2001 18:52:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/run-scripts/m-p/2560198#M872806</guid>
      <dc:creator>Vogra</dc:creator>
      <dc:date>2001-08-01T18:52:36Z</dc:date>
    </item>
    <item>
      <title>Re: run scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/run-scripts/m-p/2560199#M872807</link>
      <description>Make sure execute permission is set for the appropriate users.  Depending on the script I usually set permission to 755 or 750 or 700.&lt;BR /&gt;&lt;BR /&gt;Do a 'chmod u+x filename' so you can execute it yourself.</description>
      <pubDate>Wed, 01 Aug 2001 18:55:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/run-scripts/m-p/2560199#M872807</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2001-08-01T18:55:37Z</dc:date>
    </item>
    <item>
      <title>Re: run scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/run-scripts/m-p/2560200#M872808</link>
      <description>You do not have execution permission.&lt;BR /&gt;&lt;BR /&gt;If you have write access to the file??&lt;BR /&gt;&lt;BR /&gt;chmod 755 test.sh&lt;BR /&gt;&lt;BR /&gt;...jcd...&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 01 Aug 2001 18:56:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/run-scripts/m-p/2560200#M872808</guid>
      <dc:creator>Joseph C. Denman</dc:creator>
      <dc:date>2001-08-01T18:56:06Z</dc:date>
    </item>
    <item>
      <title>Re: run scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/run-scripts/m-p/2560201#M872809</link>
      <description>chmod 777 test.sh should do it, but you may want to make it alittle more secure..755.</description>
      <pubDate>Wed, 01 Aug 2001 18:56:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/run-scripts/m-p/2560201#M872809</guid>
      <dc:creator>Kevin Wright</dc:creator>
      <dc:date>2001-08-01T18:56:29Z</dc:date>
    </item>
    <item>
      <title>Re: run scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/run-scripts/m-p/2560202#M872810</link>
      <description>Hi&lt;BR /&gt;   Without giving the execute permission for the script you can run it by &lt;BR /&gt;&lt;BR /&gt;sh test.sh&lt;BR /&gt;&lt;BR /&gt;PRB</description>
      <pubDate>Wed, 01 Aug 2001 18:59:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/run-scripts/m-p/2560202#M872810</guid>
      <dc:creator>Praveen Bezawada</dc:creator>
      <dc:date>2001-08-01T18:59:06Z</dc:date>
    </item>
    <item>
      <title>Re: run scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/run-scripts/m-p/2560203#M872811</link>
      <description>If you have set the execute privileges for the file...I find that usually I forgot to make sure the directory(s) above the file has execute privileges too!&lt;BR /&gt;&lt;BR /&gt;This is probably the error I make all too often....give the file 750 but gave the directory 760....&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Rita</description>
      <pubDate>Wed, 01 Aug 2001 19:05:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/run-scripts/m-p/2560203#M872811</guid>
      <dc:creator>Rita C Workman</dc:creator>
      <dc:date>2001-08-01T19:05:19Z</dc:date>
    </item>
    <item>
      <title>Re: run scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/run-scripts/m-p/2560204#M872812</link>
      <description>I did not think the execute on a dir had anything to do with execution????&lt;BR /&gt;&lt;BR /&gt;Without the x perm on a dir, you cant even cd to it.&lt;BR /&gt;&lt;BR /&gt;...jcd...</description>
      <pubDate>Wed, 01 Aug 2001 19:21:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/run-scripts/m-p/2560204#M872812</guid>
      <dc:creator>Joseph C. Denman</dc:creator>
      <dc:date>2001-08-01T19:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: run scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/run-scripts/m-p/2560205#M872813</link>
      <description>Ok All!&lt;BR /&gt; I did understand. &lt;BR /&gt;Now, my problem is... the user uzzz is trying to run a script with Cron and the following msg is displayed:&lt;BR /&gt;sh: ./_ora/exp1.sh:  not found.&lt;BR /&gt;but I see de file in the specified dir.&lt;BR /&gt;???</description>
      <pubDate>Wed, 01 Aug 2001 20:28:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/run-scripts/m-p/2560205#M872813</guid>
      <dc:creator>Vogra</dc:creator>
      <dc:date>2001-08-01T20:28:29Z</dc:date>
    </item>
    <item>
      <title>Re: run scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/run-scripts/m-p/2560206#M872814</link>
      <description>Hello&lt;BR /&gt;Make sure to use the full path of the script you are trying to run. For example if I have a script in /home/richard/scripts &lt;BR /&gt;called script1 &lt;BR /&gt;in the script I would put&lt;BR /&gt;/home/richard/scripts/script1&lt;BR /&gt;not just&lt;BR /&gt;./script1&lt;BR /&gt;&lt;BR /&gt;As I have learned paths are very important.&lt;BR /&gt;Here is a past post of mine where I had the same problem. &lt;BR /&gt;I qoute Mr. A. CLay&lt;BR /&gt;This may not be all be you get the idea, remember the cron environment is intentionally very sparse and stupid; you have to tell it everything. It can barely spell cron on its own. &lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/cm/QuestionAnswer/1,1150,0x026746ff9277d511abcd0090277a778c,00.html" target="_blank"&gt;http://forums.itrc.hp.com/cm/QuestionAnswer/1,1150,0x026746ff9277d511abcd0090277a778c,00.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;hope this helps&lt;BR /&gt;&lt;BR /&gt;Richard&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 01 Aug 2001 22:08:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/run-scripts/m-p/2560206#M872814</guid>
      <dc:creator>someone_4</dc:creator>
      <dc:date>2001-08-01T22:08:52Z</dc:date>
    </item>
    <item>
      <title>Re: run scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/run-scripts/m-p/2560207#M872815</link>
      <description>the absolute path must be specified</description>
      <pubDate>Wed, 01 Aug 2001 22:22:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/run-scripts/m-p/2560207#M872815</guid>
      <dc:creator>Kevin Wright</dc:creator>
      <dc:date>2001-08-01T22:22:18Z</dc:date>
    </item>
    <item>
      <title>Re: run scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/run-scripts/m-p/2560208#M872816</link>
      <description>When creating cron jobs, it is very important to read the man page for cron where it talks about the environment.  Bascially, it says you get almost nothing.  cron does NOT login, it runs on the user's behalf but all those nice features like $PATH and other env setups will not take place.  This is why the cron job runs fine when being tested from a login but fails when run by cron.&lt;BR /&gt;&lt;BR /&gt;So good sysadmin practice for cron jobs is to write EVERY command with a leading / (also known as a full path as in /usr/bin/grep rather than just grep).  This includes any references to files, and if one script calls another, every script involved must use full pathnames.  Also, any special env setups (for example, Oracle) must be 'sourced' within the script.  &lt;BR /&gt;&lt;BR /&gt;Essentially, the cron job must explicitly setup everything that is done automatically by /etc/profile and .profile.</description>
      <pubDate>Thu, 02 Aug 2001 02:27:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/run-scripts/m-p/2560208#M872816</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2001-08-02T02:27:07Z</dc:date>
    </item>
    <item>
      <title>Re: run scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/run-scripts/m-p/2560209#M872817</link>
      <description>Hi All!&lt;BR /&gt;&lt;BR /&gt; after set the rights, the script is running, but the root mail is receiving the msg sh: ./test.sh: Execute permission denied. &lt;BR /&gt;???</description>
      <pubDate>Thu, 23 Aug 2001 19:04:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/run-scripts/m-p/2560209#M872817</guid>
      <dc:creator>Vogra</dc:creator>
      <dc:date>2001-08-23T19:04:05Z</dc:date>
    </item>
    <item>
      <title>Re: run scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/run-scripts/m-p/2560210#M872818</link>
      <description>Is the full path in the cron script ?&lt;BR /&gt;Instead of ./test in your script do  /home/whatever/scripts/test&lt;BR /&gt;and test has to have execute premissions.&lt;BR /&gt;Try chmod 777 test  but this will make this script executable by everyone. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Richard</description>
      <pubDate>Thu, 23 Aug 2001 19:25:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/run-scripts/m-p/2560210#M872818</guid>
      <dc:creator>someone_4</dc:creator>
      <dc:date>2001-08-23T19:25:43Z</dc:date>
    </item>
    <item>
      <title>Re: run scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/run-scripts/m-p/2560211#M872819</link>
      <description>Hi&lt;BR /&gt;Instead of relative path use the absolute path for the script in cron.&lt;BR /&gt;&lt;BR /&gt;Instead of ./test use /&lt;FULL_PATH&gt;/test &lt;BR /&gt;Use full path even for the commands in script test.&lt;BR /&gt;&lt;BR /&gt;Also give execute permission for the script chmod 755 test. &lt;BR /&gt;Thanks.&lt;BR /&gt;Prashant.&lt;/FULL_PATH&gt;</description>
      <pubDate>Thu, 23 Aug 2001 19:43:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/run-scripts/m-p/2560211#M872819</guid>
      <dc:creator>Deshpande Prashant</dc:creator>
      <dc:date>2001-08-23T19:43:58Z</dc:date>
    </item>
    <item>
      <title>Re: run scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/run-scripts/m-p/2560212#M872820</link>
      <description>I am not sure if this will help, but if the script is running OK you could add this to the command you running in crontab&lt;BR /&gt;&amp;gt; /dev/null 2&amp;gt;&amp;amp;1&lt;BR /&gt;This stops mail going to root.&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Thu, 23 Aug 2001 20:45:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/run-scripts/m-p/2560212#M872820</guid>
      <dc:creator>ajax13</dc:creator>
      <dc:date>2001-08-23T20:45:13Z</dc:date>
    </item>
  </channel>
</rss>

