The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

permissions issues

Discussion in 'E-mail Discussions' started by Spork Schivago, Feb 18, 2016.

  1. Spork Schivago

    Spork Schivago Well-Known Member

    Joined:
    Jan 21, 2016
    Messages:
    266
    Likes Received:
    20
    Trophy Points:
    18
    Location:
    corning, ny
    cPanel Access Level:
    Website Owner
    Hello,

    I messed up the permissions in my home directory and was hoping someone could give me a suggestion on what the proper permissions should be (or an easy way to fix them). I thought I had them fixed, but I guess not. When I try going to my domain, I get an error saying that Apache couldn't read .htaccess so it's denying access to everything. However, my .htaccess files look like this:
    Code:
    -rw-rw-r--  1 sporkschivago sporkschivago  646 Feb 12 14:42 .htaccess
    
    In WHM, I click on Repair Mailbox Permissions and that fails:
    Code:
    Failed to stat(/home/sporkschivago/mail/new): Permission denied at /usr/local/cpanel/Cpanel/Email/Perms/User.pm line 284.
    Failed to stat(/home/sporkschivago/mail/cur): Permission denied at /usr/local/cpanel/Cpanel/Email/Perms/User.pm line 284.
    Failed to stat(/home/sporkschivago/mail/tmp): Permission denied at /usr/local/cpanel/Cpanel/Email/Perms/User.pm line 284.
    Failed to stat(/home/sporkschivago/mail): Permission denied at /usr/local/cpanel/Cpanel/Email/Perms/User.pm line 284.
    Failed to stat(/home/sporkschivago/etc): Permission denied at /usr/local/cpanel/Cpanel/Email/Perms/User.pm line 284.
    Cpanel::Exception::IO::DirectoryOpenError/(XID cvp4mb) The system failed to open the directory “/home/sporkschivago/mail” because of an error: Permission denied
    at /usr/local/cpanel/Cpanel/Exception.pm line 183.
        Cpanel::Exception::new("Cpanel::Exception::IO::DirectoryOpenError", HASH(0x1efc800)) called at /usr/local/cpanel/Cpanel/Exception.pm line 75
        Cpanel::Exception::__create("IO::DirectoryOpenError", HASH(0x1efc800)) called at /usr/local/cpanel/Cpanel/FileUtils/Dir.pm line 91
        Cpanel::FileUtils::Dir::_opendir("/home/sporkschivago/mail") called at /usr/local/cpanel/Cpanel/FileUtils/Dir.pm line 57
        Cpanel::FileUtils::Dir::get_directory_nodes("/home/sporkschivago/mail") called at /usr/local/cpanel/Cpanel/FileUtils/Dir.pm line 43
        Cpanel::FileUtils::Dir::__ANON__() called at /usr/local/cpanel/3rdparty/perl/514/lib64/perl5/cpanel_lib/Try/Tiny.pm line 80
        eval {...} called at /usr/local/cpanel/3rdparty/perl/514/lib64/perl5/cpanel_lib/Try/Tiny.pm line 71
        Try::Tiny::try(CODE(0x16ec040), Try::Tiny::Catch=REF(0x1d9b8b8)) called at /usr/local/cpanel/Cpanel/FileUtils/Dir.pm line 48
        Cpanel::FileUtils::Dir::get_directory_nodes_if_exists("/home/sporkschivago/mail") called at /usr/local/cpanel/Cpanel/Email/Perms/User.pm line 186
        Cpanel::Email::Perms::User::ensure_all_perms("/home/sporkschivago") called at /usr/local/cpanel/scripts/mailperm line 405
        scripts::mailperm::__ANON__() called at /usr/local/cpanel/3rdparty/perl/514/lib64/perl5/cpanel_lib/Try/Tiny.pm line 80
        eval {...} called at /usr/local/cpanel/3rdparty/perl/514/lib64/perl5/cpanel_lib/Try/Tiny.pm line 71
        Try::Tiny::try(CODE(0x16dbc38), Try::Tiny::Catch=REF(0xe48e30)) called at /usr/local/cpanel/scripts/mailperm line 409
        scripts::mailperm::_set_perms("checkuser", undef, "dirsonly", 0, "verbose", 1, "mailgid", 12, "is_global", ...) called at /usr/local/cpanel/scripts/mailperm line 194
        scripts::mailperm::script("scripts::mailperm", "verbose", 1, "dirsonly", 0, "no-restart-cpsrvd", 0, "skipserverperm", 0, ...) called at /usr/local/cpanel/scripts/mailperm line 89
        eval {...} called at /usr/local/cpanel/scripts/mailperm line 89
    
    The permission denied directory permissions are as follows:
    Code:
    drwxr-x--x 10 sporkschivago sporkschivago 4096 Jan 21 17:56 mail/
    drwxr-x--x 2 sporkschivago sporkschivago 4096 Jan 18 23:05 mail/new/
    drwxr-x--x 2 sporkschivago sporkschivago 4096 Jan 18 23:05 mail/cur/
    drwxr-x--x 2 sporkschivago sporkschivago 4096 Jan 18 23:05 mail/tmp/
    
    drwxr-x--- 3 sporkschivago mail 4096 Jan 21 17:58 etc/
    
    Does anyone know how I can fix this? I'm running WHM as root. I just don't understand why I should even be getting these error messages...Thanks!
     
  2. Spork Schivago

    Spork Schivago Well-Known Member

    Joined:
    Jan 21, 2016
    Messages:
    266
    Likes Received:
    20
    Trophy Points:
    18
    Location:
    corning, ny
    cPanel Access Level:
    Website Owner
    I'm currently SSHd into my server but whenever I try to login as sporkschivago or my other user, I also get an error message saying the server refused my key and I see in the /var/log/secure log:
    Received disconnect from my_ip_address: 14: No supported authentication methods available
     
  3. syslint

    syslint Well-Known Member

    Joined:
    Oct 9, 2006
    Messages:
    249
    Likes Received:
    6
    Trophy Points:
    18
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Twitter:
    what is the result of the following commands ?

    # ls -ald /
    # ls -ald /home
    # ls -ald /home/sporkschivago
     
    Spork Schivago likes this.
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    653
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Yes, please review the permission and ownership values on the three directories referenced in the last response and let us know the results.

    Thank you.
     
    Spork Schivago likes this.
  5. Spork Schivago

    Spork Schivago Well-Known Member

    Joined:
    Jan 21, 2016
    Messages:
    266
    Likes Received:
    20
    Trophy Points:
    18
    Location:
    corning, ny
    cPanel Access Level:
    Website Owner
    Something's really wrong here. I enabled password authentication so I could at least get in. This is the error message I get after I type my password:
    Code:
    Last login: Thu Feb 18 06:14:26 2016 from 74.65.109.246
    Could not chdir to home directory /home/sporkschivago: Permission denied
    Attempting to create directory /home/sporkschivago/perl5
    Unable to create /home/sporkschivago: Permission denied at /usr/local/share/perl                                          5/local/lib.pm line 686.
    BEGIN failed--compilation aborted.
    Attempting to create directory /home/sporkschivago/perl5
    Unable to create /home/sporkschivago: Permission denied at /usr/local/share/perl                                          5/local/lib.pm line 686.
    BEGIN failed--compilation aborted.
    -bash: /home/sporkschivago/.bash_profile: Permission denied
    
    Here's the directory listings that you asked for.
    Code:
    root@franklin:[/]# ls -ald /
    dr-xr-xr-x 27 root root 4096 Feb 18 10:26 //
    root@franklin:[/]# ls -ald /home
    drwx--x--- 11 root root 4096 Jan 21 14:30 /home/
    root@franklin:[/]# ls -ald /home/sporkschivago
    drwxr-xr-x 26 sporkschivago sporkschivago 4096 Feb 17 22:15 /home/sporkschivago/
    
    
     
  6. Spork Schivago

    Spork Schivago Well-Known Member

    Joined:
    Jan 21, 2016
    Messages:
    266
    Likes Received:
    20
    Trophy Points:
    18
    Location:
    corning, ny
    cPanel Access Level:
    Website Owner
    I'm going to try rebooting the server and see if it fixes anything.

    EDIT: The reboot didn't help at all. Any suggestions?
     
    #6 Spork Schivago, Feb 18, 2016
    Last edited: Feb 18, 2016
  7. Spork Schivago

    Spork Schivago Well-Known Member

    Joined:
    Jan 21, 2016
    Messages:
    266
    Likes Received:
    20
    Trophy Points:
    18
    Location:
    corning, ny
    cPanel Access Level:
    Website Owner
    A little update. I just created a new shell user using adduser. I get the same permission denied error message. Would this mean there's something wrong with the actual /home directory? I didn't do anything with that folder...this is very worrisome.
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    653
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Ensure permissions on the /home/$username directory are set to 0711. Is this a VPS, and if so, which specific VPS software environment?

    Thank you.
     
  9. Spork Schivago

    Spork Schivago Well-Known Member

    Joined:
    Jan 21, 2016
    Messages:
    266
    Likes Received:
    20
    Trophy Points:
    18
    Location:
    corning, ny
    cPanel Access Level:
    Website Owner
    Thank you for your suggestion cPanelMichael, however, setting permissions to 0711 on /home/<myuser> didn't fix the problem. This problem is also occurring with new users as well as the old users on my system as well. This makes me think it might be something with the /home directory but I honestly don't see what could have happened to of changed the permissions on the /home directory. Last night, I did run the umask command, but with no parameters. It returned (I want to say) 0022. Now, when I run it, it returns 0002. Maybe it returned 0002 last night and I just didn't notice.

    This is a VPS. It's CentOS 6.7 (final) running on Virtuozzo. I don't know of anyway of telling what version of Virtuozzo though. uname shows kernel version 2.6.32-042stab092.2. When I do a df -h, I see /dev/vzfs. This is why I believe it's Virtuozzo and not OpenVZ. There's also a /proc/user_beancounters. I think this rules out Xen. So I believe it's Virtuozzo.
     
  10. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    653
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    The error message you pasted suggests the VPS that has met the "quotaugidlimit" threshold, or at some other VPS parameter limit imposed from the VPS node. Please report this issue to your VPS hosting provider to see if they can verify if any resource limits have been reached.

    Thank you.
     
    Spork Schivago likes this.
  11. Spork Schivago

    Spork Schivago Well-Known Member

    Joined:
    Jan 21, 2016
    Messages:
    266
    Likes Received:
    20
    Trophy Points:
    18
    Location:
    corning, ny
    cPanel Access Level:
    Website Owner
    I fixed the login issue! I didn't realize that things were a bit different for CentOS. I still don't know how the permissions got messed up on the home folder. I didn't mess with that. All I did was a chmod o-r * in the /home/sporkschivago directory.

    So, if I want someone to be able to view /home/sporkschivago/public_html, the public_html needs to have o+x set, /home/sporkschivago needs to have o+x set and / needs to have o+x set. When I ran chmod 0711 on /home, this fixed the issue!!!
     
  12. Spork Schivago

    Spork Schivago Well-Known Member

    Joined:
    Jan 21, 2016
    Messages:
    266
    Likes Received:
    20
    Trophy Points:
    18
    Location:
    corning, ny
    cPanel Access Level:
    Website Owner
    I don't have a quota. Well, I have a 40GB hard drive. I guess we could look at that as a quota, kinda. But I have unlimited bandwidth and no quota unless I configure a quota myself for my users.
     
  13. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    653
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  14. syslint

    syslint Well-Known Member

    Joined:
    Oct 9, 2006
    Messages:
    249
    Likes Received:
    6
    Trophy Points:
    18
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Twitter:
    Please set 755 permission on / and test it. You don't have write permission on /
     
Loading...

Share This Page