can user COMMON cPanel connect to API ?
from we get this code:
documentation in say: " Specify either the root user or a reseller user in line 2. " but: is possible allow execute ONLY THIS COMMAND: to users NOT reseller ? my target is execute the command
but just $COMMON_USER_cPanel not is reseller. is possible?
{'data'}->{'acct'} as $userdetails) {
echo "\t" . $userdetails->{'user'} . "\n";
}
}
curl_close($curl);
documentation in say: " Specify either the root user or a reseller user in line 2. " but: is possible allow execute ONLY THIS COMMAND: to users NOT reseller ? my target is execute the command
su - $COMMON_USER_cPanel -s /bin/bash -c 'ubic restart ea-tomcat85'
but just $COMMON_USER_cPanel not is reseller. is possible?
-
Hey there! The token system there is specifically for the WHMAPI commands, which would not be available to standard users. Only root and resellers with WHM access would be able to run those commands as WHM access is required, either directly through a session or through the token. 0 -
master @cPRex then how is possible su - $COMMON_USER_cPanel -s /bin/bash -c 'ubic restart ea-tomcat85'
restart TomCat from X.php ??0 -
In the Tomcat guide at Tomcat 8 and EasyApache Setup Guide, step 4 is where the root user grants access to the cPanel user to run the ubic process. 0 -
sure!, ROOT give access to RUBIC. After, how from "any.php" can user $COMMON_USER_cPanel restart TC ? yes, he can login into SHELL, but the target is doit using API interface or "file.php" 0 -
I'm not completely sure I'm following where this is going. You're saying you want to have a user be able to execute the PHP code to restart the service? I don't believe that would work either, as the PHP would be executed as either the cPanel user or Apache, and not the user with enough permissions to perform the service restart with the token. 0 -
I'm not completely sure I'm following where this is going. You're saying you want to have a user be able to execute the PHP code to restart the service? I don't believe that would work either, as the PHP would be executed as either the cPanel user or Apache, and not the user with enough permissions to perform the service restart with the token.
yes master, the idea is: "user cPanel with TC enable, restart TomCat" WITHOUT use SHELL that is all, and this user NOT is reseller0 -
There isn't going to be a way to do that - if that were possible, that would open up major security risks to the system. 0 -
then how USERX can restart TC without access to SHELL ? 0 -
There is currently not a way to do that without shell access. 0 -
There is currently not a way to do that without shell access.
and is possible as RESELLER user using API ?0 -
Yes, a reseller would have access to the whmapi. 0 -
Yes
thanks. Which is the command for a USER RESELLER restart TC ?0 -
I believe there is some confusion about the Tomcat and ubic processes. The ubic commands outlined in the guide should only be run as the user, as they are restarting their specific Tomcat application instance. Any actions performed by root or a reseller would be restarting the service for the entire machine, which is a bit different process. 0 -
yes master, the focus is restart only TomCat without use SHELL how doit ? 0 -
There isn't a way to do that, as each Tomcat instance is linked with the user, which would also need shell access. Here is an excerpt from Introduction to Tomcat | cPanel & WHM Documentation "In EasyApache 4, Tomcat runs as a per-user private instance and allows the user to configure their instance themselves. Tomcat runs as the individual user, rather than as the tomcat user. This increases security and places management of the Tomcat instance in the user"s control, but may affect your server"s performance due to the memory requirements." There is not a global restart command for a global Tomcat process, because such a process does not exist. 0 -
thanks by your time master @cPRex 0
Please sign in to leave a comment.
Comments
18 comments