UIDs mix-up & Wrong Disk Space Usage

fidividi

Well-Known Member
Feb 15, 2013
48
0
56
cPanel Access Level
Root Administrator
Hello,

We use cpRemote from Syslint to backup our cpanel accounts/databases/emails/....

Here is the scenario:

Server A: cpanel server, used for hosting + used for backup space (all backups are stored under one cpanel account /home/xyz)

Server B: cpanel server, used for hosting and backups up everything using cpremote to "Server A"

What happened is today I received complaints from 2 customers on Server A, regarding wrong disk usage. Further look in the forum I came across: http://forums.cpanel.net/f5/disk-space-281802.html#post1178222

Although it took more than 6 hours, and it never finished and I had to quit the "find" command, I able to go through the output of that in the saved file, and came across those files in Server A: "/home/xyz/backups_from_server_B/user_from_server_b/...." having strange owner and group.

Basically, all those back up files were owned by the complaining user.

When consulting with cpremote, this is their response:

Hello,


The issue occurs since the uid of the user who owns the file matches with the user in the the backup server.For eg: In main server 'USERNAME_ON_SERVER_B' have uid 520 while the user "USERNAME_ON_SERVER_A" does have the same id too .So when a file is created in the backup server , and if the uid matches , the backup server user will gain the preference and it ownership corresponds to the backup server user.

The above issue is quite normal.

According to Syslint this is "QUITE normal", not normal to me at all. It is messing up my hosting/disk space stats and my business relations with my customers.

What do you think is best to do in this case?

Does cPanel scan the whole home directory for file/folders belonging to a user when calculating consumed disk space?

I appreciate any help on this matter.

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463
Hello :)

I recommend using a backup server that is not an existing hosting server for added redundancy. However, with your existing setup, you could ensure the archives are owned by the "root" username by using root to upload the backups.

Thank you.
 

fidividi

Well-Known Member
Feb 15, 2013
48
0
56
cPanel Access Level
Root Administrator
Hi Michael,

I recommend using a backup server that is not an existing hosting server for added redundancy.
It is the plan, and work in progress, meanwhile, dealing with existing infrastructure, got to resolve this issue before more users affected.

you could ensure the archives are owned by the "root" username by using root to upload the backups.
I actually just got an update from Syslint:
Hello,

Since the conflict occur with uid's and only root user does have the permission to change ownership of files to arbitrary users with in backup server .It's better to set cpremote to take backups with a user than the root. so that ownerships wont be switched.
But the problem with what they are recommending, is originally how I started to have this issue. The whole reason I am using "root" user on backup server (Server A in my first post) to make the rsync-ed backups, is because when using a limited "Normal SSH Enabled"-User, the backup process gets jammed/stuck in the middle, and it just remains in the CPU. I am using CloudLinux/Cagefs, and after all the ups & downs, even Syslint couldn't resolve the problem.
So that's why I started using "root" user, where everything as far as the backup itself works fine. But now, instead, i am facing this problem which is affecting my customers.


Thanks a lot for any further help.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463
To clarify, are these backup archives generated through cPanel or are you transferring the full home directories in a non-compressed fashion?

Thank you.