Summary:
Executes a program on a server.
Request specification:
Name |
Min/Max |
Type |
Description |
|
|
|
|
|
|
|
|
|
|
|
Program name and expected arguments in proper order. |
|
|
|
Definitions of the OS environment variables used by the program (if any). |
|
|
|
Execute the program as user specified here. By default, the default administrative account will be used (e.g. |
|
|
|
|
|
|
|
Specify either the user name or the user ID. |
|
|
|
User name. |
|
|
|
|
|
|
|
|
|
|
|
Specify either the group name or the group ID. |
|
|
|
Group name. You may specify more than one group. If you do, the first group will be set as the effective group, the others will be set as supplementary groups. The supplementary group list will affect all of the new elements. |
|
|
|
NOTE: There are no dedicated operations to get a group ID by its name. Therefore, do not use this parameter if you're not sure it is correct. If it is wrong, the entire operation will be canceled. |
|
|
|
|
|
|
|
|
|
|
|
Change working directory. |
|
|
|
Operation umask. |
|
|
|
|
|
|
|
Standard input/output options. |
|
|
|
|
|
|
|
Program input. |
|
|
|
Include this element to report standard program output. |
|
|
|
Include this element to report program error output. |
|
|
|
Include this element to report mixed output. |
|
|
|
|
|
|
|
|
Returns:
Name |
Min/Max |
Type |
Description |
|
|
|
The program execution results. |
|
|
|
|
|
|
|
Execution status. Will contain 0 (zero) on success or non-zero value on error. |
|
|
|
Program standard output. |
|
|
|
Program error output. |
|
|
|
|
Example:
Executing the ls
command inside a Linux-based Virtuozzo Container.
Input
<packet version="4.0.0">
<dst>
<host>37ea79c2-3565-0e43-887f-91d4678c843e</host>
</dst>
<target>processm</target>
<data>
<processm>
<execute>
<argv>bHM=</argv>
<cred>
<chroot>/</chroot>
</cred>
<stdio>
<output/>
<error/>
</stdio>
</execute>
</processm>
</data>
</packet>
Output
<?xml version="1.0" encoding="UTF-8"?><ns1:packet xmlns:ns1="http://www.swsoft.com/webservices/vzl/4.0.0/protocol" xmlns:ns2="http://www.swsoft.com/webservices/vzl/4.0.0/processm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" type="0" id="4fc4631f282t2350re14" time="2007-04-27T00:55:52+0000" priority="0" version="4.0.0">
<ns1:origin>37ea79c2-3565-0e43-887f-91d4678c843e</ns1:origin>
<ns1:dst>
<ns1:director>gend</ns1:director>
<ns1:target>vzclient3</ns1:target>
</ns1:dst>
<ns1:data>
<ns2:processm>
<ns2:exec>
<ns2:status>0</ns2:status>
<ns2:output>YmluCmJvb3QKZGV2CmV0Ywpob21lCmluaXRyZApsaWIKbW50Cm9wdApwcm9jCnJvb3QKc2Jpbgp0bXAKdXNyCnZhcgp+dnphZ2VudDAK</ns2:output>
<ns2:error></ns2:error>
</ns2:exec>
</ns2:processm>
</ns1:data>
<ns1:src>
<ns1:director>vpsd</ns1:director>
<ns1:target>processm</ns1:target>
</ns1:src>
<ns1:target>vzclient3</ns1:target>
</ns1:packet>
If you decode the data contained in the output
element, you'll get the requested root directory listing:
bin
boot
dev
etc
home
initrd
lib
mnt
opt
proc
root
sbin
tmp
usr
var