<?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 init.d script permission denied in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/init-d-script-permission-denied/m-p/2514198#M22600</link>
    <description>Hi everyone,&lt;BR /&gt;&lt;BR /&gt;Background: I have to create a second instance of a running "gateway" software to start up at boot. The gateway is RedBack (database stuff) and has to run as a different user, only one specified user can start the gateway. The old instance starts fine, so I copied that init.d script and edited it as needed, and then changed the environment variables in the /etc/rc.config.d file for UDTHOME,UDTBIN &amp;amp; RBHOME (special environment variables).&lt;BR /&gt;&lt;BR /&gt;Situation: The command to start or stop the gateway dies when I try to execute it. The startup says it is already running and stop says permission denied. The command on the properly functioning gateway is su username -c "/path/to/program". The problem is the second or "newer" instance of the gateway will not start unless I put the command su - username -c "/path/to/program" (notice the - after su).&lt;BR /&gt;&lt;BR /&gt;Tried: I have even stated all the environment variables given from the env command in the /etc/rc.config.d/file and still no luck. &lt;BR /&gt;&lt;BR /&gt;Any suggestions as to what may be happening?</description>
    <pubDate>Thu, 05 Apr 2001 19:05:19 GMT</pubDate>
    <dc:creator>Jeffrey S. Sims</dc:creator>
    <dc:date>2001-04-05T19:05:19Z</dc:date>
    <item>
      <title>init.d script permission denied</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/init-d-script-permission-denied/m-p/2514198#M22600</link>
      <description>Hi everyone,&lt;BR /&gt;&lt;BR /&gt;Background: I have to create a second instance of a running "gateway" software to start up at boot. The gateway is RedBack (database stuff) and has to run as a different user, only one specified user can start the gateway. The old instance starts fine, so I copied that init.d script and edited it as needed, and then changed the environment variables in the /etc/rc.config.d file for UDTHOME,UDTBIN &amp;amp; RBHOME (special environment variables).&lt;BR /&gt;&lt;BR /&gt;Situation: The command to start or stop the gateway dies when I try to execute it. The startup says it is already running and stop says permission denied. The command on the properly functioning gateway is su username -c "/path/to/program". The problem is the second or "newer" instance of the gateway will not start unless I put the command su - username -c "/path/to/program" (notice the - after su).&lt;BR /&gt;&lt;BR /&gt;Tried: I have even stated all the environment variables given from the env command in the /etc/rc.config.d/file and still no luck. &lt;BR /&gt;&lt;BR /&gt;Any suggestions as to what may be happening?</description>
      <pubDate>Thu, 05 Apr 2001 19:05:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/init-d-script-permission-denied/m-p/2514198#M22600</guid>
      <dc:creator>Jeffrey S. Sims</dc:creator>
      <dc:date>2001-04-05T19:05:19Z</dc:date>
    </item>
    <item>
      <title>Re: init.d script permission denied</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/init-d-script-permission-denied/m-p/2514199#M22601</link>
      <description>I would suggest you create a second user account with the exact same permissions as the working user account.  Remember this "RedBack" software may not normally allow a second instance of the program to run.&lt;BR /&gt;&lt;BR /&gt;-Jason</description>
      <pubDate>Thu, 05 Apr 2001 20:02:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/init-d-script-permission-denied/m-p/2514199#M22601</guid>
      <dc:creator>Jason Morgan_1</dc:creator>
      <dc:date>2001-04-05T20:02:25Z</dc:date>
    </item>
    <item>
      <title>Re: init.d script permission denied</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/init-d-script-permission-denied/m-p/2514200#M22602</link>
      <description>The second instance will run perfectly if I put the - in the su command, or if I manually login as that user and type the command manually. There isn't a problem with not allowing a second instance in that respect. However there is something that is set with the su - that isn't set with just su.&lt;BR /&gt;&lt;BR /&gt;Just a reminder, I have already copied the output from the env command and declared all of those environment variables and that didn't work either.</description>
      <pubDate>Thu, 05 Apr 2001 21:06:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/init-d-script-permission-denied/m-p/2514200#M22602</guid>
      <dc:creator>Jeffrey S. Sims</dc:creator>
      <dc:date>2001-04-05T21:06:40Z</dc:date>
    </item>
    <item>
      <title>Re: init.d script permission denied</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/init-d-script-permission-denied/m-p/2514201#M22603</link>
      <description>Jeff, when you put the - after the su command it's like you telneted into that user. Here's an excerpt from the su man page:&lt;BR /&gt;If you specify the - option of the su command, the new shell starts up as if you just logged in, except as follows:&lt;BR /&gt;&lt;BR /&gt;         +  The HOME variable is reset to the new user's home directory.&lt;BR /&gt;&lt;BR /&gt;         +  If the new user name is root, the path and prompt variables are&lt;BR /&gt;            reset:&lt;BR /&gt;&lt;BR /&gt;                 PATH=/usr/bin:/usr/sbin:/sbin&lt;BR /&gt;                 PS1=#&lt;BR /&gt;&lt;BR /&gt;            For other user names:&lt;BR /&gt;&lt;BR /&gt;                 PATH=/usr/bin&lt;BR /&gt;                 PS1=$&lt;BR /&gt;&lt;BR /&gt;         +  The rest of the environment is deleted and reset to the login&lt;BR /&gt;            state.  However, the login files are normally executed anyway,&lt;BR /&gt;            usually restoring the expected value of PATH and other&lt;BR /&gt;            variables.&lt;BR /&gt;&lt;BR /&gt;However if you don't user the - after su:&lt;BR /&gt;&lt;BR /&gt;If you omit the - option, the new shell starts up as if you invoked it as a subshell, except as follows:&lt;BR /&gt;&lt;BR /&gt;+  If the new user name is root, the path and prompt variables are&lt;BR /&gt;reset:&lt;BR /&gt;      PATH=/usr/bin:/usr/sbin:/sbin&lt;BR /&gt;      PS1=#&lt;BR /&gt;&lt;BR /&gt;+  The rest of the environment is retained.&lt;BR /&gt;&lt;BR /&gt;Hope this helps explain it.</description>
      <pubDate>Fri, 06 Apr 2001 12:17:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/init-d-script-permission-denied/m-p/2514201#M22603</guid>
      <dc:creator>Jim Moffitt_1</dc:creator>
      <dc:date>2001-04-06T12:17:40Z</dc:date>
    </item>
  </channel>
</rss>

