Cannot run upapi or cpapi2 commands as reseller

BlueSteam

Well-Known Member
Feb 21, 2013
129
22
68
cPanel Access Level
Reseller Owner
Hello,

Every time I run any command from the shell command line as a reseller I get the following error:

[2016-05-12 10:35:43 +0200] die [apitool] setuids failed: Attempting to setuid as a normal user with RUID 826 at /usr/local/cpanel/Cpanel/AccessIds/SetUids.pm line 23.
Cpanel::AccessIds::SetUids::setuids("blustm") called at bin/apitool.pl line 63
bin::apitool::run("--user=blustm", "Resellers", "list_accounts") called at bin/apitool.pl line 23
die [apitool] setuids failed: Attempting to setuid as a normal user with RUID 826
exit level [die] [pid=25193] (setuids failed: Attempting to setuid as a normal user with RUID 826)
I'm not sure what is wrong or what I am doing wrong. Any help would be appreciated.

Thanks
Brett
 

TerranceR

Well-Known Member
Jul 9, 2015
73
9
83
Houston, TX
cPanel Access Level
Root Administrator
Hello,

These commands are only meant to be ran as root. If you need to use the API as a reseller, you will need to generate a accesskey and call it manually.

Edit to better clarify:

You can run cpapi2/uapi2 as a user however, you can only specify --user= as root.
 
Last edited:
  • Like
Reactions: FCTW

BlueSteam

Well-Known Member
Feb 21, 2013
129
22
68
cPanel Access Level
Reseller Owner
Thanks Terrance. I appreciate the reply. I thought i read somewhere that the api was able t be run by root and resellers. but if this is the way then I'll do that. :)
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,883
2,256
463
Hello,

Could you let us know the specific command you are using?

Thank you.