Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Problem with viewing Email accounts

Discussion in 'E-mail Discussion' started by NaSRi, Feb 6, 2016.

  1. NaSRi

    NaSRi Member

    Aug 13, 2014
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator
    Hello Guys

    My server has problem and users can't see their email accounts, they receive the following errors
    A warning occurred while processing this directive.
    Failed to write lock file: /home/xxxxx/mail/maildirsize.lock: Bad file descriptor at /usr/local/cpanel/Cpanel/ line 23.
    at /usr/local/cpanel/Cpanel/ line 23.
        Cpanel::SafeFileLock::new("Cpanel::SafeFileLock", "/home/xxxxx/mail/maildirsize.lock", "Permission denied") called at /usr/local/cpanel/Cpanel/ line 238
        Cpanel::SafeFile::_safelock("/home/xxxxx/mail/maildirsize") called at /usr/local/cpanel/Cpanel/ line 329
        Cpanel::SafeFile::_safe_open(IO::Handle=GLOB(0x5734ac8), 66, "/home/xxxxx/mail/maildirsize", CODE(0x5734b28), "safesysopen") called at /usr/local/cpanel/Cpanel/ line 90
        Cpanel::SafeFile::safesysopen(IO::Handle=GLOB(0x5734ac8), "/home/xxxxx/mail/maildirsize", 66) called at /usr/local/cpanel/Cpanel/Email/ line 89
        Cpanel::Email::DiskUsage::_maildirsize_handler("rename", undef, "maildir", "/home/xxxxx/mail", "create_maildirfolder", 1) called at /usr/local/cpanel/Cpanel/Email/ line 50
        Cpanel::Email::DiskUsage::calcdiskused("/home/xxxxx", "_mainaccount", "", undef, undef, "/home/xxxxx/mail", undef) called at /usr/local/cpanel/Cpanel/Email/ line 34
        Cpanel::Email::DiskUsage::mainacctdiskused("/home/xxxxx") called at /usr/local/cpanel/Cpanel/API/ line 769
        Cpanel::API::Email::get_main_account_disk_usage(Cpanel::Args=HASH(0x56e35b0), Cpanel::Result=HASH(0x56e2ef0)) called at /usr/local/cpanel/Cpanel/ line 213
        Cpanel::API::__ANON__() called at /usr/local/cpanel/Cpanel/ line 285
        eval {...} called at /usr/local/cpanel/Cpanel/ line 285
        Cpanel::API::_eval_guard(Cpanel::Result=HASH(0x56e2ef0), CODE(0x56e3cb8)) called at /usr/local/cpanel/Cpanel/ line 213
        Cpanel::API::_run_module_function(Cpanel::Args=HASH(0x56e35b0), Cpanel::Result=HASH(0x56e2ef0), "Email", "get_main_account_disk_usage") called at /usr/local/cpanel/Cpanel/ line 54
        Cpanel::API::_execute("Email", "get_main_account_disk_usage", HASH(0x56e2e50)) called at /usr/local/cpanel/Cpanel/ line 356
        Cpanel::API::wrap_deprecated("Email", "get_main_account_disk_usage") called at /usr/local/cpanel/Cpanel/ line 1202
        Cpanel::Email::mainacctdiskused("") called at line 2063
        eval {...} called at line 2063
        cpanel::cpanel::_api1("Email", "email", "mainacctdiskused()", "mainacctdiskused", ARRAY(0x56e2058), "safe_html_encode", undef, undef) called at line 1750
        cpanel::cpanel::real_exectag("<cpanel Email=\"mainacctdiskused()\">") called at line 4105
        cpanel::cpanel::dotag_finished_headers(0) called at line 3980
        cpanel::cpanel::cpanel_parseblock("<cpanel Email=\"mainacctdiskused()\">\x{a}") called at line 3895
        cpanel::cpanel::y(GLOB(0x4df0770)) called at line 5223
        cpanel::cpanel::run_standard_mode() called at line 869
        cpanel::cpanel::script("cpanel::cpanel", "./frontend/x3/mail/default_account_disk_usage.html") called at line 331
    I'd appreciated your answer .
    #1 NaSRi, Feb 6, 2016
    Last edited by a moderator: Feb 6, 2016
  2. NaSRi

    NaSRi Member

    Aug 13, 2014
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator
    Thank you
    This issue has fixed by an employee of cpanel.
    He Said
    " The mail folder permissions were also set wrong, but I was able to correct all those at once using /scripts/mailperm. However, there is no fix for the .cpanel directories in the user's folders. The .cpanel directory and the .cpanel/caches directory must be chmod 700 and must be manually changed.
    I'm not sure how this happened, as cPanel nor its scripts would make these type of permission changes. You or your systems administrator will need to visit each home directory and make sure that the .cpanel and .cpanel/caches are chmod 700. Do not do them recursively, just on each folder:

    # cd /home/<user>
    # chmod 700 .cpanel
    # chmod 700 ./cpanel/caches "

    Then I run these codes to fix permission for each directory .

    for dir in /home/*
    if [ -d "$dir" ]
    username=$(basename "$dir")
    cd $username
    chmod 700 .cpanel
    chmod 700 .cpanel/caches/
    cd ..


  3. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Apr 11, 2011
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator
    Hello :)

    I am happy to see the issue is now resolved. Thank you for updating us with the outcome.
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice