Sponsored Content
Top Forums UNIX for Beginners Questions & Answers How do I give permission for the kill command? Post 303039047 by jim mcnamara on Friday 20th of September 2019 07:01:06 PM
Old 09-20-2019
The process user running the command must be the user of the process id 3104 (in your example).
What problem are you trying to solve? Please give us your UNIX type.

As a side note kill -9 is always great choice. This option, -9, means no process can clean up after itself, and even system critical processes will get killed with no contemplation, if you escalate process privilege for an unprivileged account (user). It can really cause problems with things like file writing.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to give permission for a specified user

Hi All, How can i give permission for a specific user ( eg. admin ) ? I tried with chmod admin+r prog.sh which doesnt work. Is there any way i can specify a user's name and give the permission? Thanks in advance. Saneesh Joseph. (1 Reply)
Discussion started by: saneeshjose
1 Replies

2. Shell Programming and Scripting

if i give this command what would be the value...

if i give dir=/tmp/${0##*/} what would b the value stored in dir ..i'm more concerned about the 0##*/ part.. (1 Reply)
Discussion started by: suri
1 Replies

3. Solaris

give user permission on specific directory in solaris

dear all does any one give any user write permission using access control list or another way to solve this problem (1 Reply)
Discussion started by: murad.jaber
1 Replies

4. UNIX for Advanced & Expert Users

HOw do i give a user cronjob edit/settings permission?

Hi, In a Unix Server when i 'su' to my name and type in crontab it says " You are not authorised......". Pls suggest what to do? How do i give myself permission so that I can schedule a cron. (2 Replies)
Discussion started by: debu
2 Replies

5. Shell Programming and Scripting

Kill a process without using kill command

Sorry, posted the question in other forum. (0 Replies)
Discussion started by: sudhamacs
0 Replies

6. Linux

Kill a process without using kill command

I want to Kill a process without using kill command as i don't have privileges to kill the process. I know the pid and i am using Linux 2.6.9 OS. (6 Replies)
Discussion started by: sudhamacs
6 Replies

7. Shell Programming and Scripting

give permission to read a file

I want to give tester only the account tester to view the file /var/mail/root nobody else but him and of course the owner root w/o changing the permisions of /var/mail/root -rw-------. $ cat /var/mail/root cat: /var/mail/root: Permission denied (3 Replies)
Discussion started by: kenshinhimura
3 Replies

8. Solaris

sudo for permission kill -HUP

Hi, I'm trying to provide "/usr/bin/kill -HUP" command to one of the user using sudo file. I have configured sudo as following: $cat /etc/sudoers User_Alias AA=conadmin Cmnd_Alias KILL1=/usr/bin/kill -HUPAA ALL=NOPASSWD:KILL1 When I login as the user and execute 'sudo -l' command, it... (2 Replies)
Discussion started by: mohzub
2 Replies

9. Solaris

How to give full permission to a directory?

Hi, I have enabled the Apache webserver on my machime. Apache root directory is /etc/apache2 and the user in which the web server is configured is webservd,I guess. I have another user called perf. Under perf user there is /export/home/perf/v9 directory. I want to give the OS user of... (3 Replies)
Discussion started by: bikas89
3 Replies

10. UNIX for Advanced & Expert Users

Permission to kill a process

I'm on AIX. I have triggered an infinite loop process (to keep looking for input file availability for further process). At present only I can kill the process. In case my colleague wants to kill the process for any reason, how do I provide permission to others to kill the process? Currently... (3 Replies)
Discussion started by: krishmaths
3 Replies
kill(2) 							System Calls Manual							   kill(2)

NAME
kill - Sends a signal to a process or to a group of processes SYNOPSIS
#include <signal.h> int kill( pid_t process, int signal ); Application developers may want to specify an #include statement for <sys/types.h> before the one for <signal.h> if programs are being developed for multiple platforms. The additional #include statement is not required on Tru64 UNIX systems or by ISO or X/Open standards, but may be required on other vendors' systems that conform to these standards. STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: kill(): XSH5.0 Refer to the standards(5) reference page for more information about industry standards and associated tags. PARAMETERS
Specifies the process or group of processes. Specifies the signal. If the signal parameter is a value of 0 (the null signal), error check- ing is performed but no signal is sent. This can be used to check the validity of the process parameter. DESCRIPTION
The kill() function sends the signal specified by the signal parameter to the process or group of processes specified by the process param- eter. To send a signal to another process, at least one of the following must be true: The real or the saved set-user-ID of the sending process matches the real or effective user ID of the receiving process. The process is trying to send the SIGCONT signal to one of its session's processes. The calling process has root privileges. Processes can send signals to themselves. Sending a signal does not imply that the operation is successful. All signal operations must pass the access checks prescribed by each enforced access control policy on the system. If the process parameter is greater than 0 (zero), the signal specified by the signal parameter is sent to the process that has a process ID equal to the value of the process parameter. If the process parameter is equal to 0 (zero), the signal specified by the signal parameter is sent to all of the processes (other than system processes) whose process group ID is equal to the process group ID of the sender. If the process parameter is equal to -1, the signal specified by the signal parameter is sent to all of the processes other than system processes for which the process has permission to send that signal. For example, if the effective user ID of the sender has root privi- leges, the signal specified by the signal parameter is sent to all of the processes other than system processes. If the process parameter is negative but not -1, the signal specified by the signal parameter is sent to all of the processes which have a process group ID equal to the absolute value of the process parameter. RETURN VALUES
Upon successful completion, the kill() function returns a value of 0 (zero). Otherwise, a value of -1 is returned and errno is set to indi- cate the error. NOTES
Some applications and scripts depend on the process ID of the init program being 1 (one): do not depend on it. Instead, use standard methods, such as the ps and grep commands, to obtain all process IDs. ERRORS
The kill() function sets errno to the specified values for the following conditions: The signal parameter is not a valid signal number. [Tru64 UNIX] The signal parameter is SIGKILL, SIGSTOP, SIGTSTP or SIGCONT and the process parameter is the process ID of the init program. No process or process group can be found corresponding to that specified by the process parameter. The real or saved user ID does not match the real or effective user ID of the receiving process, the calling process does not have appropriate privilege, and the process is not sending a SIGCONT signal to one of its session's processes. [Tru64 UNIX] The calling process does not have appropriate privilege. RELATED INFORMATION
Functions: getpid(2), killpg(2), raise(3), setpgid(2), sigaction(2), sigvec(2) Standards: standards(5) delim off kill(2)
All times are GMT -4. The time now is 01:22 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy