SOLVED Can't create an email account

Ramon Pego

Member
Mar 12, 2019
11
4
3
Brazil
cPanel Access Level
Root Administrator
Hi, i'm having this issue i try to create an email account and the first time try, it shows a message saying was created, but the emails does not appears and if i try again i receive this message:

Captura de tela de 2019-06-25 16-22-57.png
Erro: Nenhum erro específico foi retornado com a chamada à API com falha.


Sorry some mesages on my cpanel is in pt_Br
 
Last edited by a moderator:

cPanelLauren

Forums Analyst II
Staff member
Nov 14, 2017
6,815
541
263
Houston
cPanel Access Level
DataCenter Provider
Hello @Ramon Pego

Is there anything output to the cPanel error log in reference to this? You can find cPanel specific errors at /usr/local/cpanel/logs/error_log
 

Ramon Pego

Member
Mar 12, 2019
11
4
3
Brazil
cPanel Access Level
Root Administrator
sure, here its whats is printed on log file when i try

Code:
[2019-07-01 13:17:51 -0300] warn [uapi] [11165] TIME 1561997871 UID 517 clobbered stale lock file “/home/$USER/etc/DOMAIN.mg.gov.br/passwd.lock” (NAME “/usr/local/cpanel/uapi”, UID 517) written by PID 27932 at 1561986515 at /usr/local/cpanel/Cpanel/SafeFile.pm line 941.
        Cpanel::SafeFile::_lock_wait(__CPANEL_HIDDEN__, Cpanel::SafeFileLock=ARRAY(0x1afbdc8), __CPANEL_HIDDEN__) called at /usr/local/cpanel/Cpanel/SafeFile.pm line 354
        Cpanel::SafeFile::_safelock("/home/$USER/etc/DOMAIN.mg.gov.br/passwd") called at /usr/local/cpanel/Cpanel/SafeFile.pm line 557
        Cpanel::SafeFile::_safe_open(GLOB(0xffb3c8), __CPANEL_HIDDEN__, __CPANEL_HIDDEN__, CODE(0x102d410), __CPANEL_HIDDEN__) called at /usr/local/cpanel/Cpanel/SafeFile.pm line 122
        Cpanel::SafeFile::safeopen(GLOB(0xffb3c8), "<", "/home/$USER/etc/DOMAIN.mg.gov.br/passwd") called at /usr/local/cpanel/Cpanel/API/Email.pm line 5063
        Cpanel::API::Email::_pop_exists("recursoshumanos", "DOMAIN.mg.gov.br") called at /usr/local/cpanel/Cpanel/API/Email.pm line 1324
        Cpanel::API::Email::add_pop(Cpanel::Args=HASH(0x19b2a18), Cpanel::Result=HASH(0x19ac510)) called at /usr/local/cpanel/Cpanel/API.pm line 340
        Cpanel::API::__ANON__() called at /usr/local/cpanel/Cpanel/API.pm line 411
        eval {...} called at /usr/local/cpanel/Cpanel/API.pm line 411
        Cpanel::API::_eval_guard(Cpanel::Result=HASH(0x19ac510), CODE(0x19b2820)) called at /usr/local/cpanel/Cpanel/API.pm line 340
        Cpanel::API::_run_module_function(Cpanel::Args=HASH(0x19b2a18), Cpanel::Result=HASH(0x19ac510), "Email", "add_pop") called at /usr/local/cpanel/Cpanel/API.pm line 202
        Cpanel::API::execute("Email", "add_pop", HASH(0x1998528)) called at /usr/local/cpanel/Cpanel/API.pm line 622
        Cpanel::API::run_api_mode(HASH(0x1998528)) called at uapi.pl line 310
        main::script() called at uapi.pl line 139
[2019-07-01 13:17:51 -0300] warn [uapi] The system encountered an error while modifying the email accounts password file: (XID n5jwu8) Falha no sistema ao definir as permissões em um ou mais nós de índice como “0640” (como EUID: 517, EGID: 517 517)devido ao seguinte erro: Operation not permitted
The system failed to set the permissions on one or more inodes to “0640” (as EUID: 517, EGID: 517 517) because of the following error: Operation not permitted at /usr/local/cpanel/Cpanel/API/Email.pm line 6172.
        Cpanel::API::Email::__ANON__(Cpanel::Exception::IO::ChmodError=HASH(0x1b92da8)) called at /usr/local/cpanel/3rdparty/perl/528/lib/perl5/cpanel_lib/Try/Tiny.pm line 118
        Try::Tiny::try(CODE(0x1b0b6d0), Try::Tiny::Catch=REF(0x1023660)) called at /usr/local/cpanel/Cpanel/API/Email.pm line 6173
        Cpanel::API::Email::_get_domain_email_dbs_transaction("/DOMAIN.mg.gov.br", 1) called at /usr/local/cpanel/Cpanel/API/Email.pm line 1336
        Cpanel::API::Email::add_pop(Cpanel::Args=HASH(0x19b2a18), Cpanel::Result=HASH(0x19ac510)) called at /usr/local/cpanel/Cpanel/API.pm line 340
        Cpanel::API::__ANON__() called at /usr/local/cpanel/Cpanel/API.pm line 411
        eval {...} called at /usr/local/cpanel/Cpanel/API.pm line 411
        Cpanel::API::_eval_guard(Cpanel::Result=HASH(0x19ac510), CODE(0x19b2820)) called at /usr/local/cpanel/Cpanel/API.pm line 340
        Cpanel::API::_run_module_function(Cpanel::Args=HASH(0x19b2a18), Cpanel::Result=HASH(0x19ac510), "Email", "add_pop") called at /usr/local/cpanel/Cpanel/API.pm line 202
        Cpanel::API::execute("Email", "add_pop", HASH(0x1998528)) called at /usr/local/cpanel/Cpanel/API.pm line 622
        Cpanel::API::run_api_mode(HASH(0x1998528)) called at uapi.pl line 310
        main::script() called at uapi.pl line 139
 
Last edited by a moderator:

cPanelLauren

Forums Analyst II
Staff member
Nov 14, 2017
6,815
541
263
Houston
cPanel Access Level
DataCenter Provider
Thanks for providing that what is the output of the following:

Code:
lsattr /home/$user/etc/domain.mg.gov.br/passwd
stat /home/$user/etc/domain.mg.gov.br/passwd
Replace user and domain with the actual user and domain name when you run the command. Please also remove any identifying information when posting the results. I've gone ahead and done this for you in the output you provided in your last response
 

Ramon Pego

Member
Mar 12, 2019
11
4
3
Brazil
cPanel Access Level
Root Administrator
alright
Code:
[[email protected] ~]# lsattr /home/user/etc/domain/passwd
-------------e- /home/prefeitu/etc/domain/passwd

--------//----------

[[email protected] ~]# stat /home/user/etc/domain/passwd
 stat /home/user/etc/domain/passwd
  File: `/home/user/etc/domain/passwd'
  Size: 915             Blocks: 8          IO Block: 4096   regular file
Device: 802h/2050d      Inode: 3146518     Links: 1
Access: (0777/-rwxrwxrwx)  Uid: (   48/  apache)   Gid: (   48/  apache)
Access: 2019-07-01 08:38:16.636996980 -0300
Modify: 2019-05-03 16:46:43.488989271 -0300
Change: 2019-06-24 16:09:07.979989867 -0300
 

cPanelLauren

Forums Analyst II
Staff member
Nov 14, 2017
6,815
541
263
Houston
cPanel Access Level
DataCenter Provider
There are two issues I see with the passwd file in this instance:

1. the permissions on it should be 640

2. The user:group should be $user:mail not apache:apache


Do other files in these directories have incorrect permissions and ownership?
 

cPanelLauren

Forums Analyst II
Staff member
Nov 14, 2017
6,815
541
263
Houston
cPanel Access Level
DataCenter Provider

cPanelLauren

Forums Analyst II
Staff member
Nov 14, 2017
6,815
541
263
Houston
cPanel Access Level
DataCenter Provider
I'm really glad it worked and to confirm you're able to create and remove email accounts now as well as see existing ones?