Cpanel::Exception::IO::ChownError/(XID ) The system failed to set the user ID to “0"

pwaara

Member
Aug 10, 2016
22
1
53
Hawaii
cPanel Access Level
Root Administrator
I keep getting the following error reported from cPanel
Cpanel::Exception::IO::ChownError/(XID qf3hja) The system failed to set the user ID to “0” and the group ID to “506” on “/var/cpanel/datastore/<user>/mysql-db-usage.json” because of an error: No such file or directory at /usr/local/cpanel/Cpanel/Exception.pm line 73.

Cpanel::Exception::create("IO::ChownError", HASH(0x2f57478)) called at /usr/local/cpanel/Cpanel/Autodie/Perms.pm line 57

Cpanel::Autodie::Perms::chown(0, 506, "/var/cpanel/datastore/<user>/mysql-db-usage.json") called at /usr/local/cpanel/Cpanel/CacheFile.pm line 234

Cpanel::CacheFile::_chown_path(__CPANEL_HIDDEN__, __CPANEL_HIDDEN__, __CPANEL_HIDDEN__, __CPANEL_HIDDEN__) called at /usr/local/cpanel/Cpanel/CacheFile.pm line 132

Cpanel::CacheFile::save("Cpanel::Mysql::DiskUsage", HASH(0x2f6cdc8), "<user>") called at bin/update_db_cache.pl line 113

Script::Update::DB::Cache::__ANON__() called at /usr/local/cpanel/3rdparty/perl/522/lib64/perl5/cpanel_lib/Try/Tiny.pm line 80

eval {...} called at /usr/local/cpanel/3rdparty/perl/522/lib64/perl5/cpanel_lib/Try/Tiny.pm line 71

Try::Tiny::try(CODE(0x2ef6290), Try::Tiny::Catch=REF(0x2ef63e0)) called at bin/update_db_cache.pl line 120

Script::Update::DB::Cache::script("Script::Update::DB::Cache") called at bin/update_db_cache.pl line 33
I am familiar with the following thread
mysql-db-usage.json missing

I used to have a second UID of 0, but I have since deleted that user. I have also disabled Named Service Cache, but I still get these errors intermittently. If I run the db update by hand it runs successfully. Any ideas?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
If I run the db update by hand it runs successfully. Any ideas?
Hello,

Please let us know the output from the following command:

Code:
/usr/bin/test -x /usr/local/cpanel/scripts/update_db_cache && /usr/local/cpanel/scripts/update_db_cache
Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Could you open a support ticket using the link in my signature so we can take a closer look? You can post the ticket number here so we can update this thread with the outcome.

Thank you.
 

pwaara

Member
Aug 10, 2016
22
1
53
Hawaii
cPanel Access Level
Root Administrator
Just to follow up for anyone else having this problem, it turned out to be duplicate cron jobs that somehow got created when I had another user with UID 0. The duplicate user had the same cron jobs as root, and they were running at the same time. This was causing all sorts of intermittent errors. Removing the cron jobs appears to have fixed the problem, so if you are experiencing something similar, take a look at the cron jobs you have for each user.