Cpanel and derivate files owners and groups on /var

AoM_Scott

Member
Aug 26, 2010
9
0
126
OK this is embarrassing but my fat fingers managed to do a recursive chown on most of /var to root:root.

This has of course broken a few of the functions of cpanel, could somebody have a quick look at the owner of all the cpanel related files in /var and let me know what to change the owners back to (where its not meant to be root:root)?

For example my installation cannot read /var/cpanel/users and therefore won't login to cPanel user accounts :rolleyes:

Thanks
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,884
2,243
463
Hello :)

Ideally, you should obtain access to another server to compare the ownership of the files/directories within the /var partition because there are several directories that are not owned by "root".

The files within the "/var/cpanel/users" directory should have user ownership set to "root", and group ownership set to the cPanel username. EX:

Code:
[email protected] [/]# ls -al /var/cpanel/users/cptest01
-rw-r----- 1 root cptest01 788 May  1 05:54 /var/cpanel/users/cptest01
The directories within "/var/cpanel/userdata" should have the same ownership values configured.

Thank you.
 

AoM_Scott

Member
Aug 26, 2010
9
0
126
Yeah that was my first thought, I have a VPS but it doesn't run cpanel so it wasn't much help. Do you have a test or demo server I could look at? (bit of a long shot!)

I'm getting exim_paniclog errors on directories such as

/var/cpanel/domain_keys/

Thanks

Scott
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,884
2,243
463
We do not have root SSH access available to the public on our demo servers. Another option to consider would be to migrate the accounts to a new server with a fresh installation of cPanel. Or, move cPanel backups of your accounts to a remote server, reinstall the OS/cPanel, and then restore the accounts.

Thank you.
 

AoM_Scott

Member
Aug 26, 2010
9
0
126
OK I'll have a think about what to do, at least I can log into cPanel again now.

Also, bit unrelated but I setup Logaholic on one of my accounts and the stats show for one day and are zero for every day after that? Almost like the log files aren't being processed? This was before my destruction of /var.

Thanks

Scott
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,884
2,243
463
I moved the Logaholic question into it's own thread for you. It can be found at:

Logaholic Issue

Thank you.