dcsimg
Runtime.exec() launching sub-process as wrong user.
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Adrian_Maggio
Posted On:   Friday, May 7, 2004 11:15 AM

I am using Runtime.exec() to run the command: "/usr/sbin/ps -aef". Usually, the command which is exec'ed is run as the user that the jvm is running as. The application is deployed on a RAID which lives on one machine. It can be launched from either of two machines that share the RAID. When launched from the machine that "owns" the RAID, the "ps" command is exec'ed as user "root", and it hangs. When launched from the machine which has access to the RAID's top-level directory, the "ps" command is exec'ed as the user who launched the jvm, and it does not hang. I would appreciate it if anyone has any insight into why something like this would occur. Tha   More>>

I am using Runtime.exec() to run the command:
"/usr/sbin/ps -aef".

Usually, the command which is exec'ed is run as the user that the jvm is running as.

The application is deployed on a RAID which lives on one machine. It can be launched from either of two machines that share the RAID.

When launched from the machine that "owns" the RAID, the "ps" command is exec'ed as user "root", and it hangs.
When launched from the machine which has access to the RAID's top-level directory, the "ps" command is exec'ed as the user who launched the jvm, and it does not hang.

I would appreciate it if anyone has any insight into why something like this would occur. Thanks.

   <<Less
About | Sitemap | Contact