plesk api shell access

為{幸葍}努か 提交于 2019-12-13 06:07:42

问题


i try create script to add new domain in plesk whit api, im write this script :

<packet version='1.4.2'> 
<domain>
<add>
   <gen_setup>
      <name>domain.com</name>
      <client_id>1</client_id>
      <ip_address>127.0.0.1</ip_address>
      <status>0</status>
   </gen_setup>
   <hosting>
      <vrt_hst>
          <ftp_login>username</ftp_login>
          <ftp_password>password</ftp_password>
          <php>true</php>
          <ssi>true</ssi>
          <cgi>true</cgi>
          <php_safe_mode>false</php_safe_mode>
          <ip_address>127.0.0.1</ip_address>
      </vrt_hst>
   </hosting>
</add>
</domain>
</packet>

The script add new domain bat not working ssh access, i need add shell access to this script. Thanks all


回答1:


It depends on plesk/protocol version. Try to add <shell>/bin/bash</shell> in <vrt_hst>...</vrt_hst>

Next query works for Plesk 10/11:

<packet version="1.6.3.0">
<webspace>
<add>
   <gen_setup>
      <name>example.com</name>
      <owner-id>1</owner-id>
      <htype>vrt_hst</htype>
      <ip_address>10.0.0.1</ip_address>
      <status>0</status>
   </gen_setup>
   <hosting>
      <vrt_hst>
          <property>
            <name>shell</name>
            <value>/bin/bash</value>
          </property>
          <property>
            <name>ftp_login</name>
            <value>ftp16se4fdf0</value>
          </property>
          <property>
            <name>ftp_password</name>
            <value>qweqwe</value>
          </property>
          <ip_address>10.0.0.1</ip_address>
       </vrt_hst>
    </hosting>
</add>
</webspace>
</packet>


来源:https://stackoverflow.com/questions/15855710/plesk-api-shell-access

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!