Permissions issues after turning on http2
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 :)
-
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? 0 -
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? 0 -
Hi @Zoee Can you give me the output for the following: stat /home/$user
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:stat /home/$user/wp-content
stat /home/$user/uploads
Thanks!0 -
Thanks Lauren, hopefully I've done this right! I've replaced my user with $user for safety :) 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: -
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: -
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: -
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: -
0 -
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! 0 -
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 :) 0 -
Hi @Zoee You can see this from WHM>>Software>>MultiPHP Manager -> PHP Handlers 0 -
hmmm... it says "PHP Handlers do not apply to PHP-FPM." 0 -
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. 0 -
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. 0 -
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 0 -
Hi Lauren, I've done this but still no luck! The issue is the same. Shall I open a support ticket? 0 -
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! 0 -
Thanks Laura, ticket ID is 11352759 0 -
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! 0
Please sign in to leave a comment.
Comments
15 comments