Hi there,
I work on a cPanel plugin and I was trying to debug an error from a customer by trying to reproduce it on our test machine. The error was happening when calling the REST version of
For this, I had to go and fiddle around with the
To continue debugging, I wanted to remove this account and create another account. However, I am facing a similar error plus one more while trying to terminate the account:

I tried a bunch of different things including some of the steps mentioned here. I thought it could be that cached file is outdated so I ran the relevant commands from the doc but running
I also checked
I'm quite unsure what to do at this point. I'd appreciate it if I could get some help for the following:
1. Is there a way to recreate a corrupt/empty user config file and resolve this error?
2. Is there a way to resolve this issue when there's a backup of the user config file present?
3. Is there a way to ignore this error and proceed to remove the account from WHM?
The cPanel version is 100.0 (build 4) and the server is running CentOS Linux 7.
I work on a cPanel plugin and I was trying to debug an error from a customer by trying to reproduce it on our test machine. The error was happening when calling the REST version of
whmapi1 --output=jsonpretty accountsummary
and the error was as follows:
Code:
API failure: Failed to read data: Is a directory at /usr/local/cpanel/Cpanel/LoadFile/ReadFast.pm line 126.
/var/cpanel/users/user
file. I tried to remove it completely (but made a .bak from it before doing so) and tried moving it back again. But this didn't produce the same error as above. I then tried to keep it there but empty the file. And bingo! I found the same error.To continue debugging, I wanted to remove this account and create another account. However, I am facing a similar error plus one more while trying to terminate the account:

I tried a bunch of different things including some of the steps mentioned here. I thought it could be that cached file is outdated so I ran the relevant commands from the doc but running
userdata_update
showed the following error:
Code:
Skipping cPanel user shru1. Missing main domain.
/usr/local/cpanel/logs/error_log
when I tried to delete and it shows the following error:
Code:
[2021-12-02 14:27:10 +0000] info [xml-api] Error: invalid domain [removeacct] version [1]
1. Is there a way to recreate a corrupt/empty user config file and resolve this error?
2. Is there a way to resolve this issue when there's a backup of the user config file present?
3. Is there a way to ignore this error and proceed to remove the account from WHM?
The cPanel version is 100.0 (build 4) and the server is running CentOS Linux 7.