Permissions issues after turning on http2

Zoee

Member
Sep 30, 2016
18
2
3
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 :)

 

Zoee

Member
Sep 30, 2016
18
2
3
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?
 

cPanelLauren

Forums Analyst II
Staff member
Nov 14, 2017
8,126
667
263
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!
 

Zoee

Member
Sep 30, 2016
18
2
3
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: -
 

cPanelLauren

Forums Analyst II
Staff member
Nov 14, 2017
8,126
667
263
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!
 

Zoee

Member
Sep 30, 2016
18
2
3
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 :)
 
Last edited by a moderator:

Zoee

Member
Sep 30, 2016
18
2
3
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.
 
Last edited by a moderator: