• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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