• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

Resolved File permission after changing PHP

Jim

Basic Pleskian
In the hosting settings, I changed the PHP support from Run PHP as CGI Application to Apache module and all the sudden I have file permission issues in WordPress. I added pasacln to apache :
Code:
sudo /usr/sbin/usermod -a -G apache pasacln

but I still have the file permission issue. If I switch back to PHP as CGI Application, then permission issue is resolved.

Can someone suggest a way to fix this?
 
Hi Jim,


pls. correct your command to: => psacln

... and pls. consider as well to add
Code:
sudo /usr/sbin/usermod -a -G nginx psacln

thanks but it says "user 'psacln' does not exist"

when I login using FTP it own/group for the files is "my_ftp_user psacln"
 
ups... sorry... my fault... I just copied YOUR command, without thinking about it.

The CORRECT command is certainly:

Code:
usermod -aG psacln nginx
... where the FIRST is always the GROUP and the second one is always the USER. ;)
 
ups... sorry... my fault... I just copied YOUR command, without thinking about it.

The CORRECT command is certainly:

Code:
usermod -aG psacln nginx
... where the FIRST is always the GROUP and the second one is always the USER. ;)
is this the only command I should run? just for nginx and no apache one?
 
Hi Jim,

there is "normally" no need to add the apache - system - user to the group psacln, but it won't do any harm to your system, if you do that. ;)
 
Hi Jim,

there is "normally" no need to add the apache - system - user to the group psacln, but it won't do any harm to your system, if you do that. ;)
Thanks, I added the command but I still have the permission issue
WordPress keeps asking me for ftp credentials and in some plugins I get can't write to file errors

if I switch back to PHP as CGI Application, then permission issue is resolved.

I want to be able to work with Apache module and not the PHP as CGI Application
 
Hi Jim,

pls. feel free to enable the ( old ) PHP - handlers ( which is not recommended anymore, because of several vulnerabilities! ), which are disabled by default now.


First, REREAD your PHP - handler, which are installed on your server ( logged in as user "root" over SSH ):
Code:
plesk bin php_handler --reread

Second, pls. LIST your PHP - handler on the command line:
Code:
plesk bin php_handler --list

Third, pls. ENABLE possible handler, which are in the state "disabled":
Code:
EXAMPLES ( !!! )

plesk bin php_handler --enable -id module

plesk bin php_handler --enable -id plesk-php71-cgi


=> You are now able to use the "mod_php" ( module ) version, and as well the CGI - version of the corresponding PHP - version. ;)
 
Last edited by a moderator:
  • Like
Reactions: Jim
@UFHH
Hi Jim,

pls. feel free to enable the PHP - modules ( which is not recommended anymore, because of several vulnerabilities! ), which are disabled by default now.


First, REREAD your PHP - handler, which are installed on your server ( logged in as user "root" over SSH ):
Code:
plesk bin php_handler --reread

Second, pls. LIST your PHP - handler on the command line:
Code:
plesk bin php_handler --list

Third, pls. ENABLE possible handler, which are in the state "disabled":
Code:
EXAMPLES ( !!! )

plesk bin php_handler --enable -id module

plesk bin php_handler --enable -id plesk-php71-cgi


=> You are now able to use the "mod_php" ( module ) version, and as well the CGI - version of the corresponding PHP - version. ;)

Thanks, I didnt know PHP module is risky. The only reason I wanted to use it was to use APC. I installed APC using your instructions here but when I go to mysite.com/apc.php It says that APC is not installed. If I switched to Apache Module then it says APC is installed. We cant use APC when we have run php as fastcgi application?
 
Hi Jim,

did you know, that each PHP - version has it's OWN modules? To install APCu for your vendor PHP version, you would certainly use for example:

Code:
pecl install apcu

But if you use for example the additional PHP - version Plesk-PHP 7.1 for your (sub)domain, then you have to use:

Code:
/opt/plesk/php/7.1/bin/pecl install apcu




The "mod_php" - version is from your VENDOR and depending to your operating system and possible manual additionals, you will find this version at "/etc/php" or "/etc/php5". But when you use one of the Plesk PHP versions, the paths are:

Code:
/opt/plesk/php/5.2/
/opt/plesk/php/5.3/
/opt/plesk/php/5.4/
/opt/plesk/php/5.5/
/opt/plesk/php/5.6/
/opt/plesk/php/7.0/
/opt/plesk/php/7.1/
 
Back
Top