safe_userchgid error or IP MISSING in WHM on VPS containers

Issue: While creating an account in WHM, sometime following error occurs:

safe_userchgid: chown Permission denied at /usr/local/cpanel/Cpanel/SafetyBits.pm

Although, the account has created but IP will be MISSING in the List Accounts section in WHM

FIX: You should try to add an user in your VPS to confirm the error:

# useradd cptesting001
Setting mailbox file permissions: Disk quota exceeded

You can also get the details of error using the following command:

# grep vzfs /usr/local/cpanel/logs/error_log
edquota: Cannot set quota for user 828 from kernel on /dev/vzfs: No such process
edquota: Can't write quota for 828 on /dev/vzfs: No such process

In this case, the problem is that quotaugidlimit has been reset to its default for some reason and it's causing the container not to be able to manage users and groups correctly anymore. An easy fix is to simply increase the quotaugidlimit to something above the total of the number of users and groups currently configured. Have a look on the following example:

# wc -l /vz/root/190/etc/{passwd,group}
 264 /vz/root/190/etc/passwd
 278 /vz/root/190/etc/group
 542 total

# vzctl set 190 --save --quotaugidlimit 600

After you change quotaugidlimit, you will need to restart the container:

# vzctl restart 190

If you don't have hardware node access, you need to contact your VPS providers to increase the quotaugidlimit value.

Cheers :)

Comments

Popular posts from this blog

SVN: File remains in conflict

HowTo: Enable extended logging for exim

12 tweakings for WHM/cPanel to speed up WordPress