Re: [psutil] Get working directory of another user process?

40 views
Skip to first unread message

Jay Loden

unread,
Jan 23, 2013, 9:45:26 AM1/23/13
to psu...@googlegroups.com
Are you running this as the root user? A regular end user account will not be able to access the information for another process due to privileges rights. This is normal behavior for Linux - you need to run the script as a root user, with sudo for temporary root privileges, or as the end user that created the process. 

-Jay

On Tue, Jan 22, 2013 at 9:40 PM, Richard <rich...@gmail.com> wrote:
Hello, 

I am using v0.4.1 on Linux with Python 2.7.3.

Is it possible to get the working directory of a process started by another user? 
I can access other details but not the working directory:

>>> p = psutil.Process(OTHER_USER_PROCESS_ID) 
>>> p.cmdline
[...]
>>> p.name
...
>>> p.getcwd() 
 AccessDenied Exception

--
--
You received this message because you are subscribed to the "Python process utilities (psutil)" project group:
http://code.google.com/p/psutil
To post to this group, send email to psu...@googlegroups.com
To unsubscribe from this group, send email to psutil-un...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/psutil
 
 

Reply all
Reply to author
Forward
0 new messages