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!

Permissions issues after turning on http2

Discussion in 'EasyApache' started by Zoee, Dec 29, 2018.

  1. Zoee

    Zoee Member

    Joined:
    Sep 30, 2016
    Messages:
    16
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    Hi all, I was running the default cpanel profile, I've now amended this to switch on mod_http2 via Easy Apache 4, as part of this I had to disable mod_cgi, mod_ruid2 and mod_mpm_prefork, so I switched on mod_cgid and mod_mpm_event in there place.

    When I do this, everything largely works fine, but this server runs 2 WordPress websites, and the permissions settings change - I can't upload images via the media library or FTP.

    To upload I have to change the permissions from 755 to 777, which I don't really want to do.

    From doing a bit of googling I think this might be because the public_html folders now belong to "nobody" but this is where I start to get out of my depth...

    Any help would be appreciated :)

     
  2. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,149
    Likes Received:
    474
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    It sounds like you're running into this because mod_ruid2 runs scripts as the user automatically whereas without it or suPHP it's running as the user/group that owns it. Changing the user/group for public_html to user:user shouldn't be an issue. What PHP handler are you using now?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Zoee

    Zoee Member

    Joined:
    Sep 30, 2016
    Messages:
    16
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    Hi there, thanks for helping Lauren! I have enabled suPHP but still can't upload without amending the permissions to 777. Do I need to do something else too?
     
  4. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,149
    Likes Received:
    474
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @Zoee

    Can you give me the output for the following:

    Code:
    stat /home/$user
    Code:
    stat /home/$user/public_html/
    Do the same for the directory the WordPress installation lives in if it isn't public_html - in my case my WordPress installation is inside my public html but it's possible this is different for you.

    Then:

    Code:
    stat /home/$user/wp-content
    Code:
    stat /home/$user/uploads

    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. Zoee

    Zoee Member

    Joined:
    Sep 30, 2016
    Messages:
    16
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    Thanks Lauren, hopefully I've done this right! I've replaced my user with $user for safety :)

    Code:
    stat /home/$user
    
      File: ‘/home/$user/’
    Size: 4096            Blocks: 8          IO Block: 4096   directory
    Device: fd03h/64771d    Inode: 6424638     Links: 15
    Access: (0711/drwx--x--x)  Uid: ( 1001/$user)   Gid: ( 1004/$user)
    Context: system_u:object_r:home_root_t:s0
    Access: 2019-01-07 14:00:38.910149394 +0000
    Modify: 2018-08-22 13:04:30.477369067 +0100
    Change: 2019-01-04 18:40:56.581839256 +0000
     Birth: -
    Code:
    stat /home/$user/public_html/
    
      File: ‘/home/$user/public_html/’
      Size: 4096            Blocks: 8          IO Block: 4096   directory
    Device: fd03h/64771d    Inode: 6424684     Links: 7
    Access: (0750/drwxr-x---)  Uid: ( 1001/$user)   Gid: (   99/  nobody)
    Context: system_u:object_r:home_root_t:s0
    Access: 2019-01-07 14:00:40.585195388 +0000
    Modify: 2018-12-18 11:34:06.404487843 +0000
    Change: 2019-01-04 18:40:56.581839256 +0000
     Birth: -

    Code:
    stat /home/$user/public_html/wp-content/
    
      File: ‘/home/$user/public_html/wp-content/’
      Size: 4096            Blocks: 8          IO Block: 4096   directory
    Device: fd03h/64771d    Inode: 6425312     Links: 11
    Access: (0755/drwxr-xr-x)  Uid: ( 1001/$user)   Gid: ( 1004/$user)
    Context: system_u:object_r:home_root_t:s0
    Access: 2019-01-07 14:00:42.854257694 +0000
    Modify: 2018-11-28 09:06:04.957125180 +0000
    Change: 2018-11-28 09:06:04.957125180 +0000
     Birth: -

    Code:
    stat /home/$user/public_html/wp-content/uploads/
    
      File: ‘/home/$user/public_html/wp-content/uploads/’
      Size: 135168          Blocks: 272        IO Block: 4096   directory
    Device: fd03h/64771d    Inode: 6425328     Links: 9
    Access: (0755/drwxr-xr-x)  Uid: ( 1001/$user)   Gid: ( 1004/$user)
    Context: system_u:object_r:home_root_t:s0
    Access: 2019-01-07 14:00:44.434301080 +0000
    Modify: 2019-01-04 10:12:58.525829708 +0000
    Change: 2019-01-04 18:46:25.177277687 +0000
     Birth: -
     
  6. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,149
    Likes Received:
    474
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @Zoee

    This was perfect! The permissions/ownership all look normal. To be sure, you installed and enabled suPHP on the version of PHP you're using from the MultiPHP manager correct? If so can you please open a ticket using the link in my signature? Once open please reply with the Ticket ID here so that we can update this thread with the resolution once the ticket is resolved.


    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. Zoee

    Zoee Member

    Joined:
    Sep 30, 2016
    Messages:
    16
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    Hi Laura, I've checked easy apache, and can't see a way to check it against the PHP versions I have installed...

    I already have this switched on within the apache modules section:

    - Removed -

    Thanks :)
     
    #7 Zoee, Jan 10, 2019
    Last edited by a moderator: Jan 10, 2019
  8. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,149
    Likes Received:
    474
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @Zoee

    You can see this from WHM>>Software>>MultiPHP Manager -> PHP Handlers
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. Zoee

    Zoee Member

    Joined:
    Sep 30, 2016
    Messages:
    16
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    hmmm... it says "PHP Handlers do not apply to PHP-FPM."
     
  10. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,149
    Likes Received:
    474
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @Zoee

    No, they do not apply, are you running php-fpm instead of suPHP? This can also be seen in the MultiPHP Manager interface.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. Zoee

    Zoee Member

    Joined:
    Sep 30, 2016
    Messages:
    16
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    So it looks like I might have both turned on... should I switched of FPM and run suPHP instead?
    - Removed -

    Prior to switching http2 on we were just using the cpanel default profile.
     
    #11 Zoee, Jan 11, 2019
    Last edited by a moderator: Jan 11, 2019
  12. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,149
    Likes Received:
    474
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @Zoee


    Let's try that for that domain, just switch PHP-FPM off and check if you're able to upload without the permissions being 777
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  13. Zoee

    Zoee Member

    Joined:
    Sep 30, 2016
    Messages:
    16
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    Hi Lauren, I've done this but still no luck! The issue is the same. Shall I open a support ticket?
     
  14. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,149
    Likes Received:
    474
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @Zoee

    That would be a fantastic idea, it'll be much easier to diagnose the issue with access to the system. Once you've opened the ticket please add the ticket ID here so we can update this thread with the outcome.


    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  15. Zoee

    Zoee Member

    Joined:
    Sep 30, 2016
    Messages:
    16
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    Thanks Laura, ticket ID is 11352759
     
    #15 Zoee, Feb 3, 2019
    Last edited by a moderator: Feb 3, 2019
  16. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,149
    Likes Received:
    474
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @Zoee

    I found the ticket, thanks for that. It looks like it's awaiting an update for you before we're able to continue. I'll continue to check in on the ticket and I'll update here with the outcome once it's resolved.


    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

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