Sponsored Content
Top Forums Shell Programming and Scripting Help needed in killing a process Post 302094197 by nathan on Thursday 26th of October 2006 12:30:13 AM
Old 10-26-2006
What user are you logged in as? Obviously, if you're not the owner of the process ( I assume "infodba"? ) or the superuser, you won't be able to kill it. What does the 'id' command display?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

killing a child process

I am calling another script from my main script and making it run in the background,based upon the value of the input provided by the user I want to kill the child process ,I have written this code timer.ksh & PID=$$ print "\n Do you wish to continue .. (Y/N) : \c " read kill_proc if ]... (4 Replies)
Discussion started by: mervin2006
4 Replies

2. UNIX for Dummies Questions & Answers

killing a process

I can kill running processes on my linux red hat system using ctrl-c but cannot do it from command line of another terminal using kill -2 pid. Although I can kill them from command line using kill -9 pid and other signals. I would like to do it using the kill -2 pid. Thanks for your suggestions (6 Replies)
Discussion started by: bbhayana
6 Replies

3. Shell Programming and Scripting

Killing specific process

Hello, I need to create a process that will kill a specific process if it's running. Let's just say the process is called win, actually called something else. It could be running multiple times on the machine and I would want to kill them all. Below is the code I have written so far, and it... (6 Replies)
Discussion started by: benefactr
6 Replies

4. Shell Programming and Scripting

Killing of a process and send a mail if the process doesnot come up within 2 minutes

Hi Friends, I am new to this forum as well as new to shell scripting. I have a problem here and i need someone to solve this. Let us consider there are two processes(abc & def).There is a script which kills these two processes(i.e killtheprocess abc). Here abc is the argument . There is a... (1 Reply)
Discussion started by: Prince89
1 Replies

5. UNIX for Dummies Questions & Answers

killing the process

Hi, First, I am running a scipt.While the script is running I realize that I dont want the script to be run so I am killing the script externally.Before the process gets terminated or killed it should delete all the temporary files created by the script.How to do this?Can anyone help me? ... (3 Replies)
Discussion started by: arthi
3 Replies

6. Shell Programming and Scripting

Killing process!!!!

Hi friends, i m in big trouble.... i have one script which connects two server ...like below.. script1.sh ------------------------------------- bash test.sh & eval x=$@ export x=`echo $x` #echo $x # ssh user@8.2.5.6 bash /mbbv/location/script.sh $x|sed '/Binary file/d'... (1 Reply)
Discussion started by: Shahul
1 Replies

7. Shell Programming and Scripting

script not killing process!

i am using script to connect remotly to server and run some commands , one of these commands is to kill some process but tried different ways with no hope sshpass -p 'pass' ssh -o StrictHostKeyChecking=no server kill -9 `pgrep procs` getting error message "kill: bad argument count" ... (2 Replies)
Discussion started by: mogabr
2 Replies

8. Shell Programming and Scripting

Finding the age of a unix process, killing old processes, killing zombie processes

I had issues with processes locking up. This script checks for processes and kills them if they are older than a certain time. Its uses some functions you'll need to define or remove, like slog() which I use for logging, and is_running() which checks if this script is already running so you can... (0 Replies)
Discussion started by: sukerman
0 Replies

9. Shell Programming and Scripting

killing a process by date

Folks , Trying to create a script / command that kills an application process , but on the ones that are from the current date backwards. So far I have everything working minus the "date" part. Can you help me ? current command : kill -9 `ps -aef | grep app_name | grep -v grep | awk... (13 Replies)
Discussion started by: iMark
13 Replies

10. Shell Programming and Scripting

Killing the process ID's

Hi , I have a list of application process id's. Is there a way to kill all the process listed below using the script, except the once which are starting with " Genesis " adm 1522 ABC_Process.tra adm 1939 Genesis_Process.tra adm 2729 Genesis_Archive.tra adm 3259 xyz_Process.tra (5 Replies)
Discussion started by: murali1687
5 Replies
chown(2)							System Calls Manual							  chown(2)

NAME
chown, lchown, fchown - Changes the owner and group IDs of a file SYNOPSIS
#include <unistd.h> int chown( const char *path, uid_t owner, gid_t group ); int lchown( const char *path, uid_t owner, gid_t group ); int fchown( int filedes, uid_t owner, gid_t group ); STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: chown(): POSIX.1, XPG4, XPG4-UNIX fchown(): POSIX.1, XPG4-UNIX lchown(): POSIX.1, XPG4-UNIX Refer to the standards(5) reference page for more information about industry standards and associated tags. PARAMETERS
Specifies the name of the file whose owner ID, group ID, or both are to be changed. When the path parameter refers to a symbolic link, the behaviors of the chown() and the lchown() functions differ. The chown() function changes the ownership of the file pointed to by the sym- bolic link. The lchown() function changes the ownership of the symbolic link file itself. Specifies a valid open file descriptor. Speci- fies a numeric value representing the owner ID. Specifies a numeric value representing the group ID. DESCRIPTION
The chown(), lchown() and fchown() functions change the owner and group of a file. A process can change the value of the owner ID of a file only if the process has superuser privilege. A process can change the value of the file group ID if the effective user ID of the process matches the owner ID of the file, or if the process has superuser privilege. A process without superuser privilege can change the group ID of a file only to the value of its effective group ID or to a value in its sup- plementary group list. If the value of the owner ID is changed and the process does not have superuser privilege, the set-user ID attribute (the S_ISUID bit) of a regular file is cleared. The set-user ID attribute (S_ISUID bit) of a file is cleared upon successful return if: The file is a regular file. The process does not have superuser privilege. The set-group ID attribute (S_ISGID bit) of a file is cleared upon successful return if: The file is a regular file. The process does not have superuser privilege. If the owner or group parameter is specified as (uid_t)-1 or (gid_t)-1 respectively, the corresponding ID of the file is unchanged. Upon successful completion, the chown(), lchown(), and fchown() functions mark the st_ctime field of the file for update. RETURN VALUES
Upon successful completion, the chown(), lchown(), and fchown() functions return a value of 0 (zero). Otherwise, a value of -1 is returned, the owner and group of the file remain unchanged, and errno is set to indicate the error. ERRORS
If the chown() and lchown() functions fail, errno may be set to one of the following values: Search permission is denied on a component of path. The path parameter is an invalid address. The owner or group ID is not a value supported by this implementation. Too many links were encountered in translating path. The length of the path argument exceeds PATH_MAX or a pathname component is longer than NAME_MAX. The path parameter does not exist or is an empty string. A component of path is not a directory. The effective user ID does not match the ID of the owner of the file, and the calling process does not have appropriate privilege and _POSIX_CHOWN_RESTRICTED indicates that such privilege is required. The named file resides on a read-only file system. The process' root or current directory is located in a virtual file system that has been unmounted. If the fchown() function fails, errno may be set to one of the following values: The file descriptor filedes is not valid. The owner or group ID is not a value supported by this implementation. RELATED INFORMATION
Functions: chmod(2) Commands: chown(1) Standards: standards(5) delim off chown(2)
All times are GMT -4. The time now is 12:50 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy