You may get the error “root.json is non-existent or empty” when trying to add cPanel security questions. ( WHM >> Security Center >> Security Questions >> Edit Question and Answers. )
You will see the error “[a fatal error or timeout occurred while processing this directive] security question”, and when you click on it, you will get the detailed error.
"'/var/cpanel/userhomes/cpanel/.cpanel/securitypolicy/questions/root.json' is non-existent or empty at /usr/local/cpanel/Cpanel/JSON.pm line 88. Cpanel::JSON::LoadFile('/var/cpanel/userhomes/cpanel/.cpanel/securitypolicy/questions/ro...') called at /usr/local/cpanel/Cpanel/Security/Policy/SourceIPCheck/Util.pm line 146 Cpanel::Security::Policy::SourceIPCheck::Util::loadsecquestions('/var/cpanel/userhomes/cpanel/.cpanel/securitypolicy', 'HASH(0x29bc7e0)', 'root') called at whostmgr/bin/whostmgr2 line 13302 main::edit_sourceipcheck() called at whostmgr/bin/whostmgr2 line 1142 "
You are getting this error most probably because the “/var/cpanel/userhomes/cpanel/.cpanel/securitypolicy/questions/root.json” file is empty. ( This is the file where cPanel store the security questions and it do have a format ). To fix this issue, you can simply move the “/var/cpanel/userhomes/cpanel/.cpanel/securitypolicy/questions/root.json” file to “root.json.bck”.
mv /var/cpanel/userhomes/cpanel/.cpanel/securitypolicy/questions/root.json /var/cpanel/userhomes/cpanel/.cpanel/securitypolicy/questions/root.json.bck
Everything will work fine after that.