<?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: Cron permission problem in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-permission-problem/m-p/5000761#M424485</link>
    <description>Hi, &lt;BR /&gt;&lt;BR /&gt;I found the problem - and it's a strange error for a simple config problem. &lt;BR /&gt;&lt;BR /&gt;The problem was inmy scheduling. I had 1 too many "*" in my scheduling. I removed the extra and all is well now! &lt;BR /&gt;&lt;BR /&gt;Such a mis-leading error, and what a wild goose -chase. &lt;BR /&gt;&lt;BR /&gt;Thanks for the responses though. &lt;BR /&gt;&lt;BR /&gt;Kevin.</description>
    <pubDate>Thu, 31 Aug 2006 21:43:13 GMT</pubDate>
    <dc:creator>Kepstein</dc:creator>
    <dc:date>2006-08-31T21:43:13Z</dc:date>
    <item>
      <title>Cron permission problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-permission-problem/m-p/5000755#M424479</link>
      <description>Hi All,&lt;BR /&gt;&lt;BR /&gt;I have a strange cron permission problem. I have a small perl script that needs to run every day at 16:00. The scheduling side of this is no problem. The problem I have is that when cron executes my perl script I get the following error:&lt;BR /&gt;&lt;BR /&gt;sh: in: Execute permission denied.&lt;BR /&gt;&lt;BR /&gt;I've checked the file permission - no problems there. I've also checked that the path to perl in the header of my perl script points to my valid perl path. &lt;BR /&gt;&lt;BR /&gt;I've also checked that the script runs as root without problem from the command line, and there are no problems there either.&lt;BR /&gt;&lt;BR /&gt;I'm a little stumped. &lt;BR /&gt;&lt;BR /&gt;Anyone got some ideas. TIA&lt;BR /&gt;&lt;BR /&gt;Kevin</description>
      <pubDate>Thu, 31 Aug 2006 20:29:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-permission-problem/m-p/5000755#M424479</guid>
      <dc:creator>Kepstein</dc:creator>
      <dc:date>2006-08-31T20:29:15Z</dc:date>
    </item>
    <item>
      <title>Re: Cron permission problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-permission-problem/m-p/5000756#M424480</link>
      <description>Since it runs from an interactive shell, this has to be an environment problem. I would actually run the Perl script from within a wrapper shell script that is in turn started by cron. This will make it easier to set and export any needed environment variables and pass any needed arguments to the Perl script without having to worry about any cron syntax. Remember cron's environment is intentionally very sparse and ${PATH} is extremely limited. The user's .profile is not sourced by cron.&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;Because of your error message, it appears to me that the shell (which cron uses) rather than Perl is having the problem and the most likely culprit is a small error in your "shebang line"&lt;BR /&gt;Is the first line of your Perl script very similar to this?&lt;BR /&gt;#!/usr/bin/perl -w &lt;BR /&gt;&lt;BR /&gt;The only other "gotcha" is that stdin is no longer a terminal (tty) device so that too could have some impact depending upon what your script actually does. Notice that it cannot execute the "in" command.&lt;BR /&gt;</description>
      <pubDate>Thu, 31 Aug 2006 21:01:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-permission-problem/m-p/5000756#M424480</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2006-08-31T21:01:26Z</dc:date>
    </item>
    <item>
      <title>Re: Cron permission problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-permission-problem/m-p/5000757#M424481</link>
      <description>Hi, &lt;BR /&gt;&lt;BR /&gt;I had throught that it might be an issue with STDIN / STDOUT but my script simply picks up a file and makes an FTP connection and drops it off the file. That's about it from a functionality point of view for the script. I also looked for the substring "in" in my perl script, and the only place that it exists is in the first line of the script&lt;BR /&gt;&lt;BR /&gt;#!/usr/local/bin/perl &lt;BR /&gt;&lt;BR /&gt;with "in" being a substring of "bin"&lt;BR /&gt;&lt;BR /&gt;What does the -w switch do?&lt;BR /&gt;&lt;BR /&gt;Thanks. &lt;BR /&gt;Kevin</description>
      <pubDate>Thu, 31 Aug 2006 21:09:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-permission-problem/m-p/5000757#M424481</guid>
      <dc:creator>Kepstein</dc:creator>
      <dc:date>2006-08-31T21:09:37Z</dc:date>
    </item>
    <item>
      <title>Re: Cron permission problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-permission-problem/m-p/5000758#M424482</link>
      <description>Do a man perlrun. It will explain the -w flag but essentially it enables warnings. You should also add "use strict;" Those two things will make your Perl much more robust although you will need to get used to declaring variables as:&lt;BR /&gt;my $a;&lt;BR /&gt;or&lt;BR /&gt;our $b;&lt;BR /&gt;... but that's a good thing.&lt;BR /&gt;&lt;BR /&gt;Since you are FTP'ing, I assume that you are using Net::FTP. If not, you may be having an input/output rediection problem. &lt;BR /&gt;&lt;BR /&gt;Start by creating your wrapper script and exporting any variables that you might think you need. If there are any commands that you are using that are not in /usr/bin then make sure that you augment PATH or use absolute pathnames.&lt;BR /&gt;</description>
      <pubDate>Thu, 31 Aug 2006 21:17:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-permission-problem/m-p/5000758#M424482</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2006-08-31T21:17:31Z</dc:date>
    </item>
    <item>
      <title>Re: Cron permission problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-permission-problem/m-p/5000759#M424483</link>
      <description>Oh, and one other gotcha might be that you have to add some -I arguments to your Perl invocation in case under cron it doesn't know where to look for modules.&lt;BR /&gt;</description>
      <pubDate>Thu, 31 Aug 2006 21:19:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-permission-problem/m-p/5000759#M424483</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2006-08-31T21:19:03Z</dc:date>
    </item>
    <item>
      <title>Re: Cron permission problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-permission-problem/m-p/5000760#M424484</link>
      <description>Hi, &lt;BR /&gt;&lt;BR /&gt;I tried with a wrapper script. Inside the script I included the .profile for the user. Then I noticed something interesting. I had a mistake in my filename when changing it to the wrapper script, so nothing should have run, yet I got exactly the same error! No I believe that the problem has nothing to do with my perl script at all but something odd happening within the cron sub system. Something I have a question about - does cron have problems running programs if the user that cron is running as has a profile of /bin/false?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Kevin</description>
      <pubDate>Thu, 31 Aug 2006 21:31:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-permission-problem/m-p/5000760#M424484</guid>
      <dc:creator>Kepstein</dc:creator>
      <dc:date>2006-08-31T21:31:20Z</dc:date>
    </item>
    <item>
      <title>Re: Cron permission problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-permission-problem/m-p/5000761#M424485</link>
      <description>Hi, &lt;BR /&gt;&lt;BR /&gt;I found the problem - and it's a strange error for a simple config problem. &lt;BR /&gt;&lt;BR /&gt;The problem was inmy scheduling. I had 1 too many "*" in my scheduling. I removed the extra and all is well now! &lt;BR /&gt;&lt;BR /&gt;Such a mis-leading error, and what a wild goose -chase. &lt;BR /&gt;&lt;BR /&gt;Thanks for the responses though. &lt;BR /&gt;&lt;BR /&gt;Kevin.</description>
      <pubDate>Thu, 31 Aug 2006 21:43:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-permission-problem/m-p/5000761#M424485</guid>
      <dc:creator>Kepstein</dc:creator>
      <dc:date>2006-08-31T21:43:13Z</dc:date>
    </item>
    <item>
      <title>Re: Cron permission problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-permission-problem/m-p/5000762#M424486</link>
      <description>Cron does not check your crontab entries and will save your crontab even if theres a mistake. The problem I had was 1 too many "*" characters in the scheduling. After fixing this, cron ran my script as expected.</description>
      <pubDate>Thu, 31 Aug 2006 21:49:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-permission-problem/m-p/5000762#M424486</guid>
      <dc:creator>Kepstein</dc:creator>
      <dc:date>2006-08-31T21:49:03Z</dc:date>
    </item>
  </channel>
</rss>

