LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-09-2005, 03:08 AM   #1
balteo
LQ Newbie
 
Registered: Jul 2002
Posts: 27

Rep: Reputation: 15
How to determine who the process' owner* is?


Hello,

I am currently working on the set guid property and I am not able to determine who the process' owner* of a given process is.

Neither the kde console guard nor the ps command seems to give any indication on who the process' owner* is.

My question is as follows: what is the command that allows to determine who the owner* of a given process is?

J.

*(according to documentation below.)

I quote LPI Linux Certification In A Nutshell (O'Reilly): "Normally the user who launches a program owns the resulting process. However, if an executable file has its SUID bit set, the file's owner owns the resulting process, no matter who launched it."
 
Old 09-09-2005, 03:17 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
just use the "u" flag with ps
 
1 members found this post helpful.
Old 09-09-2005, 03:23 AM   #3
thehungrypenguin
LQ Newbie
 
Registered: Sep 2005
Distribution: Suse 9.2 64-bit
Posts: 5

Rep: Reputation: 2
Hi,

Use "ps u"

USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
gary 6753 0.3 0.4 9952 2272 pts/2 Ss 11:20 0:00 /bin/bash
gary 6761 0.0 0.1 3472 736 pts/2 R+ 11:20 0:00 ps u

or "ps aux" to get all the processes on the system. You can also use grep to find the process you want. So if you have started process called "job123" you would type "ps aux | grep job123"

I hope that helps.
 
2 members found this post helpful.
Old 04-20-2013, 05:40 AM   #4
Pluto-13s
LQ Newbie
 
Registered: Apr 2013
Posts: 1

Rep: Reputation: Disabled
stat -c %U $0
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
shell script to read ps -e output and determine process double processes. dr_zayus69 Programming 1 09-21-2005 05:37 PM
Determine process memory consumption ? shayer009 Linux - General 1 10-28-2004 02:03 PM
Owner KennieNL Linux - Newbie 2 07-16-2004 03:20 AM
How to determine whether a PROCESS is running, by a SHELL program? yuzuohong Linux - General 4 01-21-2003 08:41 PM
apache, process owner, and rsync/ssh question Kruel Linux - Networking 0 03-01-2002 12:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration