How do I give permission for the kill command?


 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers How do I give permission for the kill command?
# 1  
Old 09-20-2019
How do I give permission for the kill command?

Code:
<?php
 $comando = "kill -9 3104";
 $output = shell_exec($comando);
?>

I am running this web page, but it does not execute the command, in the log file it looks like this:

Code:
sh: 1: kill: Operation not permitted

How do I give permission to execute the command?
# 2  
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.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
Login or Register to Ask a Question