SOLVED Permission Error After Update

Operating System & Version
Centos 7
cPanel & WHM Version
v96.0.9

Raistlin

Registered
Mar 25, 2020
4
2
3
Turkey
cPanel Access Level
Root Administrator
Hi, at 10.06.2021 04:00, my cPanel updated itself and then web sites working in hosting accounts started giving permission errors like "Permission denied in" etc.

Nothing has been changed in server configurations/php etc. since 1 year and it was working fine until the update v96.0.9.

When a PHP file tries to create a file, it is either not created or created as nobody:nobody, not user:user and with wrong permissions in public_html.

File Protection is enabled,
Using

  • mod_mpm_event
  • mod_cgid
  • mod_http2
  • mod_fcgid
  • mod_cache_disk
  • mod_cache_socache
  • mod_cache
  • PHP FPM
 

cPJustinD

Administrator
Staff member
Jan 12, 2021
286
52
103
Houston
cPanel Access Level
Root Administrator

cPJustinD

Administrator
Staff member
Jan 12, 2021
286
52
103
Houston
cPanel Access Level
Root Administrator
These issues have already been corrected; however, the previous workaround is noted here:

Workaround
You can re-enable PHP-FPM for the domains via MultiPHP Manager in WHM using the steps outlined here.



To reinstate all domains that were previously using PHP-FPM with their customizations, please perform the following:

  • Connect to your server via SSH as the root user
  • Create a file 'fix.pl' with your preferred text editor with the following contents:
#!/usr/local/cpanel/3rdparty/bin/perl
use strict;
use warnings;
use Cpanel::JSON;
use Data::Dumper;
use File::Slurp;
use YAML::Syck;
my $file = "@ARGV";
my $json = File::Slurp::slurp ($file);
my $hr = Cpanel::JSON::Load ($json);
my $yaml = YAML::Syck::Dump ($hr);
print $yaml . "\n";
  • Make sure the file is executable by running:
chmod +x fix.pl
  • Run the following loop:
find /var/cpanel/userdata -type f -iname '*fpm.cache' | while read file; do ./fix.pl ${file} > $(echo ${file} | sed 's/cache/yaml/'); done
  • Rebuild all of the PHP-FPM configurations:
/scripts/php_fpm_config --rebuild


Each domain should now properly show as enabled in PHP-FPM and have their previous customizations in place.
If this does not resolve the issue, however, please open a support ticket so that our analyst can take a closer look.
 

cPJustinD

Administrator
Staff member
Jan 12, 2021
286
52
103
Houston
cPanel Access Level
Root Administrator
I think it would be best to open a support ticket so that our analysts can review the issue more thoroughly and determine what exactly is occurring. You can submit a support request using the "Submit a ticket" link in my signature below.

Please be sure to link this thread when opening the ticket and provide the ticket number here so that we can track the issue appropriately. If possible, please post the resolution on this thread as it may help other community members with similar issues.
 
  • Like
Reactions: Nate Reist