<?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: kill: &amp;lt;pid&amp;gt; : Permission denied. in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/kill-lt-pid-gt-permission-denied/m-p/5219231#M466508</link>
    <description>Hi:&lt;BR /&gt;&lt;BR /&gt;I agree with Pete insofar as this would appear to be the loss of the 'setuid' bit and the ownership by 'root' during file restoration.&lt;BR /&gt;&lt;BR /&gt;If that's true, and restoring these settings fixes your problem, I suspect that your operating system release may be pre-11.23.  The 'setuid' bit isn't normally honored on shell scripts at that level unless you alter the kernel 'secure_sid_scripts' parameter.&lt;BR /&gt;&lt;BR /&gt;As noted, 'setuid' scripts are potentially very dangerous from a security standpoint.  You can create a C-wrapper and set the 'setuid' bit on that; or use SUDO (as already suggested) as you move forward.&lt;BR /&gt;&lt;BR /&gt;Whatever you do, do NOT established multiple uid=0 accounts.  This is an accident waiting to happen when you one day remove the account with a uid=0 thinking that it isn't 'root'.  It's the uid=0 that equates to 'root' whatever the name is.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Thu, 14 Jan 2010 12:51:39 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2010-01-14T12:51:39Z</dc:date>
    <item>
      <title>kill: &lt;pid&gt; : Permission denied.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/kill-lt-pid-gt-permission-denied/m-p/5219219#M466496</link>
      <description>Hi there,&lt;BR /&gt;&lt;BR /&gt;We do have a script for our internal IT support team to terminate user's process (pid). It works previously and this morning our new SA delete the script accidentally. Unfortunately it doesn't work anymore after we do the restoration.  &lt;BR /&gt;&lt;BR /&gt;/user/livebgi% ll killer&lt;BR /&gt;-rwxrwxrwx   1 lowsyhtg   informix       263 Jan 13 08:19 killer&lt;BR /&gt;/user/livebgi% more killer&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;echo You are about to kill a user process, enter user to kill? Who is that lucky person?&lt;BR /&gt;read usr_name&lt;BR /&gt;a=`ps -ef|grep "$usr_name"|grep -v grep|grep -v ps|cut -c10-14|sort -r`&lt;BR /&gt;&lt;BR /&gt;echo Killing the process belongs to user $usr_name:$a&lt;BR /&gt;kill -9 $a&lt;BR /&gt;&lt;BR /&gt;#!/bin/csh&lt;BR /&gt;/user/livebgi%&lt;BR /&gt;/user/livebgi% finger | grep ycchong&lt;BR /&gt;ycchong  Chong Yew Choun      *t9e 4:14 Thu 08:37  Marketing&lt;BR /&gt;/user/livebgi% killer&lt;BR /&gt;You are about to kill a user process, enter user to kill? Who is that lucky person?&lt;BR /&gt;ycchong&lt;BR /&gt;Killing the process belongs to user ycchong:19800 19797 18350 18088&lt;BR /&gt;kill: 19800: Permission denied.&lt;BR /&gt;kill: 19797: Permission denied.&lt;BR /&gt;kill: 18350: Permission denied.&lt;BR /&gt;kill: 18088: Permission denied.&lt;BR /&gt;/user/livebgi%&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Please assist!!</description>
      <pubDate>Thu, 14 Jan 2010 10:19:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/kill-lt-pid-gt-permission-denied/m-p/5219219#M466496</guid>
      <dc:creator>LawrenceLow</dc:creator>
      <dc:date>2010-01-14T10:19:36Z</dc:date>
    </item>
    <item>
      <title>Re: kill: &lt;pid&gt; : Permission denied.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/kill-lt-pid-gt-permission-denied/m-p/5219220#M466497</link>
      <description>change the ownership of the script to root by using chown command and try ... best of luck</description>
      <pubDate>Thu, 14 Jan 2010 10:24:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/kill-lt-pid-gt-permission-denied/m-p/5219220#M466497</guid>
      <dc:creator>Jupinder Bedi</dc:creator>
      <dc:date>2010-01-14T10:24:44Z</dc:date>
    </item>
    <item>
      <title>Re: kill: &lt;pid&gt; : Permission denied.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/kill-lt-pid-gt-permission-denied/m-p/5219221#M466498</link>
      <description>Jupinder,&lt;BR /&gt;&lt;BR /&gt;/user/livebgi % ll killer&lt;BR /&gt;-rwxrwxrwx   1 root       sys            263 Jan 13 08:19 killer&lt;BR /&gt;/user/livebgi % killer&lt;BR /&gt;You are about to kill a user process, enter user to kill? Who is that lucky person?&lt;BR /&gt;lowsyhth&lt;BR /&gt;Killing the process belongs to user lowsyhth: 4176&lt;BR /&gt;kill: 4176: Permission denied.&lt;BR /&gt;/user/livebgi %&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;still remain the same....&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 14 Jan 2010 10:42:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/kill-lt-pid-gt-permission-denied/m-p/5219221#M466498</guid>
      <dc:creator>LawrenceLow</dc:creator>
      <dc:date>2010-01-14T10:42:48Z</dc:date>
    </item>
    <item>
      <title>Re: kill: &lt;pid&gt; : Permission denied.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/kill-lt-pid-gt-permission-denied/m-p/5219222#M466499</link>
      <description>Lawrence,&lt;BR /&gt;&lt;BR /&gt;I suppose that you run this script as root, right?&lt;BR /&gt;&lt;BR /&gt;Horia.</description>
      <pubDate>Thu, 14 Jan 2010 10:46:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/kill-lt-pid-gt-permission-denied/m-p/5219222#M466499</guid>
      <dc:creator>Horia Chirculescu</dc:creator>
      <dc:date>2010-01-14T10:46:09Z</dc:date>
    </item>
    <item>
      <title>Re: kill: &lt;pid&gt; : Permission denied.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/kill-lt-pid-gt-permission-denied/m-p/5219223#M466500</link>
      <description>are you using the root user normal user to kill the processes. if you are using normail user you cant kill the processes unless or until you have root permission otherwise you need to use the sudo&lt;BR /&gt;&lt;BR /&gt;# ./killer&lt;BR /&gt;$ sudo ./killer</description>
      <pubDate>Thu, 14 Jan 2010 10:48:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/kill-lt-pid-gt-permission-denied/m-p/5219223#M466500</guid>
      <dc:creator>Jupinder Bedi</dc:creator>
      <dc:date>2010-01-14T10:48:42Z</dc:date>
    </item>
    <item>
      <title>Re: kill: &lt;pid&gt; : Permission denied.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/kill-lt-pid-gt-permission-denied/m-p/5219224#M466501</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;   you must be root user to kill the process. so, try login with root and killing those processes.&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Thu, 14 Jan 2010 10:51:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/kill-lt-pid-gt-permission-denied/m-p/5219224#M466501</guid>
      <dc:creator>Vishu</dc:creator>
      <dc:date>2010-01-14T10:51:12Z</dc:date>
    </item>
    <item>
      <title>Re: kill: &lt;pid&gt; : Permission denied.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/kill-lt-pid-gt-permission-denied/m-p/5219225#M466502</link>
      <description>Nope, previously we can to use Informix user to kill the process. In fact, the script is mainly for our internal IT support team to kill the normal user's process.</description>
      <pubDate>Thu, 14 Jan 2010 10:56:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/kill-lt-pid-gt-permission-denied/m-p/5219225#M466502</guid>
      <dc:creator>LawrenceLow</dc:creator>
      <dc:date>2010-01-14T10:56:10Z</dc:date>
    </item>
    <item>
      <title>Re: kill: &lt;pid&gt; : Permission denied.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/kill-lt-pid-gt-permission-denied/m-p/5219226#M466503</link>
      <description>You can do it 2 ways:&lt;BR /&gt;&lt;BR /&gt;1. modify your script tu use sudo in order to send the kill command &lt;BR /&gt;&lt;BR /&gt;or &lt;BR /&gt;&lt;BR /&gt;2. modify your "normal" user setting user id=0 in /etc/passwd&lt;BR /&gt;&lt;BR /&gt;Maybe you used the second 'solution'&lt;BR /&gt;&lt;BR /&gt;Best regards&lt;BR /&gt;Horia.</description>
      <pubDate>Thu, 14 Jan 2010 11:01:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/kill-lt-pid-gt-permission-denied/m-p/5219226#M466503</guid>
      <dc:creator>Horia Chirculescu</dc:creator>
      <dc:date>2010-01-14T11:01:04Z</dc:date>
    </item>
    <item>
      <title>Re: kill: &lt;pid&gt; : Permission denied.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/kill-lt-pid-gt-permission-denied/m-p/5219227#M466504</link>
      <description>Lawrance,&lt;BR /&gt;&lt;BR /&gt;  one user cannot kill any process initiated by the other user or you have to be super user for that.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 14 Jan 2010 11:02:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/kill-lt-pid-gt-permission-denied/m-p/5219227#M466504</guid>
      <dc:creator>Vishu</dc:creator>
      <dc:date>2010-01-14T11:02:17Z</dc:date>
    </item>
    <item>
      <title>Re: kill: &lt;pid&gt; : Permission denied.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/kill-lt-pid-gt-permission-denied/m-p/5219228#M466505</link>
      <description>Try setting it up like this:&lt;BR /&gt;&lt;BR /&gt;-rwsr-xr--   1 root       informix      1280 Feb 22  2005 killer&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Thu, 14 Jan 2010 11:03:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/kill-lt-pid-gt-permission-denied/m-p/5219228#M466505</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2010-01-14T11:03:09Z</dc:date>
    </item>
    <item>
      <title>Re: kill: &lt;pid&gt; : Permission denied.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/kill-lt-pid-gt-permission-denied/m-p/5219229#M466506</link>
      <description>&amp;gt;a=`ps -ef|grep "$usr_name"|grep -v grep|grep -v ps|cut -c10-14|sort -r`&lt;BR /&gt;&lt;BR /&gt;You can optimize this to make it safer.&lt;BR /&gt;a=$(ps -fu $usr_name | cut -c10-14 | sort -r)&lt;BR /&gt;&lt;BR /&gt;You can get ps(1) to provide the column you need so you don't need cut(1).&lt;BR /&gt;a=$(UNIX95=EXTENDED_PS ps -u $usr_name -opid= | sort -r)&lt;BR /&gt;&lt;BR /&gt;&amp;gt;kill -9 $a&lt;BR /&gt;&lt;BR /&gt;Probably better to do a normal kill before you do a kill -9.</description>
      <pubDate>Thu, 14 Jan 2010 11:11:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/kill-lt-pid-gt-permission-denied/m-p/5219229#M466506</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2010-01-14T11:11:50Z</dc:date>
    </item>
    <item>
      <title>Re: kill: &lt;pid&gt; : Permission denied.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/kill-lt-pid-gt-permission-denied/m-p/5219230#M466507</link>
      <description>&lt;!--!*#--&gt;&amp;gt; [...] after we do the restoration. &lt;BR /&gt;&lt;BR /&gt;Who did "the restoration", how?&lt;BR /&gt;&lt;BR /&gt;&amp;gt; Try setting it up like this:&lt;BR /&gt;&lt;BR /&gt;It's easy to lose an "s" like that, if "the&lt;BR /&gt;restoration" is not done by "root", or it's&lt;BR /&gt;not done carefully.  With good reason, the OS&lt;BR /&gt;is not eager to let just anyone set an&lt;BR /&gt;SUID/SGID flag (or arbitrary owner/group) on&lt;BR /&gt;a file.&lt;BR /&gt;&lt;BR /&gt;&amp;gt; -rwsr-xr-- [...]&lt;BR /&gt;&lt;BR /&gt;And with that "s" there, you don't want a "w"&lt;BR /&gt;anywhere else, either.  (Unless you're&lt;BR /&gt;_looking_ for trouble.)</description>
      <pubDate>Thu, 14 Jan 2010 12:21:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/kill-lt-pid-gt-permission-denied/m-p/5219230#M466507</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2010-01-14T12:21:59Z</dc:date>
    </item>
    <item>
      <title>Re: kill: &lt;pid&gt; : Permission denied.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/kill-lt-pid-gt-permission-denied/m-p/5219231#M466508</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;I agree with Pete insofar as this would appear to be the loss of the 'setuid' bit and the ownership by 'root' during file restoration.&lt;BR /&gt;&lt;BR /&gt;If that's true, and restoring these settings fixes your problem, I suspect that your operating system release may be pre-11.23.  The 'setuid' bit isn't normally honored on shell scripts at that level unless you alter the kernel 'secure_sid_scripts' parameter.&lt;BR /&gt;&lt;BR /&gt;As noted, 'setuid' scripts are potentially very dangerous from a security standpoint.  You can create a C-wrapper and set the 'setuid' bit on that; or use SUDO (as already suggested) as you move forward.&lt;BR /&gt;&lt;BR /&gt;Whatever you do, do NOT established multiple uid=0 accounts.  This is an accident waiting to happen when you one day remove the account with a uid=0 thinking that it isn't 'root'.  It's the uid=0 that equates to 'root' whatever the name is.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 14 Jan 2010 12:51:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/kill-lt-pid-gt-permission-denied/m-p/5219231#M466508</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2010-01-14T12:51:39Z</dc:date>
    </item>
    <item>
      <title>Re: kill: &lt;pid&gt; : Permission denied.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/kill-lt-pid-gt-permission-denied/m-p/5219232#M466509</link>
      <description>&amp;gt; And with that "s" there, you don't want a "w" anywhere else, either&lt;BR /&gt;&lt;BR /&gt;Are you saying that the "w" for owner is a problem?  I must be missing something (I do that every once in a while, especially as I get older) because I can't see how that would be an issue.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Thu, 14 Jan 2010 12:57:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/kill-lt-pid-gt-permission-denied/m-p/5219232#M466509</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2010-01-14T12:57:59Z</dc:date>
    </item>
    <item>
      <title>Re: kill: &lt;pid&gt; : Permission denied.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/kill-lt-pid-gt-permission-denied/m-p/5219233#M466510</link>
      <description>Or are you saying "anywhere else" other than owner?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Thu, 14 Jan 2010 12:58:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/kill-lt-pid-gt-permission-denied/m-p/5219233#M466510</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2010-01-14T12:58:48Z</dc:date>
    </item>
    <item>
      <title>Re: kill: &lt;pid&gt; : Permission denied.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/kill-lt-pid-gt-permission-denied/m-p/5219234#M466511</link>
      <description>&lt;!--!*#--&gt;&amp;gt; Or are you saying "anywhere else" other&lt;BR /&gt;&amp;gt; than owner?&lt;BR /&gt;&lt;BR /&gt;I thought that "anywhere else" meant anywhere&lt;BR /&gt;else, that is, in some other place, where&lt;BR /&gt;"other", here, means other than where it was&lt;BR /&gt;shown.&lt;BR /&gt;&lt;BR /&gt;Clearer?</description>
      <pubDate>Thu, 14 Jan 2010 17:26:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/kill-lt-pid-gt-permission-denied/m-p/5219234#M466511</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2010-01-14T17:26:18Z</dc:date>
    </item>
    <item>
      <title>Re: kill: &lt;pid&gt; : Permission denied.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/kill-lt-pid-gt-permission-denied/m-p/5219235#M466512</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; Pete: Are you saying that the "w" for owner is a problem? I must be missing something (I do that every once in a while, especially as I get older) because I can't see how that would be an issue...Or are you saying "anywhere else" other than owner?&lt;BR /&gt;&lt;BR /&gt;I don't view leaving the owner permissions with "w"rite access in this case to be a problem.  After all, in this example, 'root's the owner and it doesn't matter.&lt;BR /&gt;&lt;BR /&gt;Personally, I like to remove write permissions from most scripts entirely and only override a 'vi' edit of them with a 'wq!'.&lt;BR /&gt;&lt;BR /&gt;Conferring write permission to anyone else other than the owner (i.e. to the group or to the world) would, of course, be a hugh security risk.  Anyone could adapt the script to his or her needs!&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 14 Jan 2010 17:36:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/kill-lt-pid-gt-permission-denied/m-p/5219235#M466512</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2010-01-14T17:36:04Z</dc:date>
    </item>
    <item>
      <title>Re: kill: &lt;pid&gt; : Permission denied.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/kill-lt-pid-gt-permission-denied/m-p/5219236#M466513</link>
      <description>Steven&amp;gt;  Clearer?&lt;BR /&gt;&lt;BR /&gt;Totally transparent - thanks!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Jim, thanks for the confirmation.  I wasn't reading Steven's comments correctly and thought there was some facet of permissions that I'd missed way back in "Intro To HP-UX".&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Thu, 14 Jan 2010 17:42:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/kill-lt-pid-gt-permission-denied/m-p/5219236#M466513</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2010-01-14T17:42:01Z</dc:date>
    </item>
    <item>
      <title>Re: kill: &lt;pid&gt; : Permission denied.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/kill-lt-pid-gt-permission-denied/m-p/5219237#M466514</link>
      <description>The problem has been resolved by changing permission.&lt;BR /&gt;&lt;BR /&gt;-r-sr-xr-x   1 root       bin            263 Jan 13 08:19 killer&lt;BR /&gt;</description>
      <pubDate>Mon, 18 Jan 2010 10:43:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/kill-lt-pid-gt-permission-denied/m-p/5219237#M466514</guid>
      <dc:creator>LawrenceLow</dc:creator>
      <dc:date>2010-01-18T10:43:30Z</dc:date>
    </item>
  </channel>
</rss>

