• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • 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.

Issue ftp user cannot modify apache user's files

Art J

New Pleskian
Hello Dears,

I am sorry if this is a duplicatate ticket, but I've read a lot of on internet and still did not realize how to fix the problem with ftp and apache users permissions in plesk.
The thing is that we have a CRM running in the domain and all files/folders have permissions 755 apache:apache. When we want to edit some file via ftp we receiving permission denied.

Could you please let us know how to fix this?

Br,
Art J
 
Use FastCGI or php-fpm then you will avoid this issue. For existing ones you will need to change back manually.
 
thanks for your quick feedback. I don't have fast cgi:

application cgi.jpg

for the moment i've put "run PHP as" "application CGI". and did chown -R ftpuser:psacln in vhosts/domain/httpdocs/*. i left the files with 755 permissions and until now the developper is happy with this solution, he can ftp(w+r+x) and work in the CRM web

Can you pls tell me if this is good solution or not?

Br,
Art J
 
If it works and suits your needs, then it is a good solution (or at least a step in the right direction), but the preferred one should be PHP-FPM.

It would help if you included some information about your system (every time you create a new thread), like
  • OS & version
  • Plesk version
  • Apache version
I am guessing you are on Centos 7, which should have no problems running PHP-FPM.

First, check Plesk > Tools & Settings > PHP Settings and report back with what handlers have you got listed there.
 
hi Urki,

Thanks for your feedback. You are right the OS is Centos7, plesk is the last available version 12.5.30 and apache version is Apache/2.4.6.
PHP settings are below:

on 5.4.16 by OS vendor Application CGI 1
on 5.4.16 by OS vendor Application FastCGI 0
on 5.4.16 by OS vendor Application PHP 0
on 5.4.16 by OS vendor Module Apache 2

Thank you in advance,

Br,
Art J
 
Seems like you do not have PHP-FPM installed, lets check that first by
Code:
rpm -qa | grep 'fpm'
you should see the line "php-fpm-5.4.16-36.1.el7_2.1.x86_64".

If it is not there, you could try to install PHP-FPM by
Code:
yum install php-fpm
You could also try to install a Plesk PHP package which should include the PHP-FPM handler at Tools & Settings > Updates and Upgrades >Add/Remove Components > Web hosting features > PHP interpreters versions.
 
Hi Urki,

Again thanks for your detailed feedback. I tried to install it via web interface, however I was unable to find it:

PHP interpreter versions (1 sur 7 selectionnes)

PHP 7.0
PHP 5.6
PHP 5.5
PHP 5.4
PHP 5.3
PHP 5.2
PHP 5 from OS vendor

I want to ask you to give me few ideas about differences between PHP-FPM and PHP-CGI. what is designed for what? I read little bit in the internet(http://serverfault.com/questions/64...es-between-fast-cgi-cgi-mod-php-suphp-php-fpm) and it seems to me that if i will enabel php-fpm i will again face the problems with ftp and apache users permissions.

Could you please clarfiy?

Thnx,
Art J
 
You can install without problem PHP multiple version, I suggest to do with autoinstaller of PLESK.
Then you will see in PLESK the php-fpm. That will work.
Also you need for existing files with apache user to change manually the rights.

cd /var/www/vhosts/yourdomain.com/httpdocs/
ls -al (to see the user)
chown yourusername:psacln * -R (be sure you are in the correct domain folder (use eventually pwd to see this)
Could be that repair of PLESk can do this, I am not sure.
 
Hi Valics,
Thnx for your feedback. Could you please tell me what will give me multiple PHP versions?
You can install without problem PHP multiple version, I suggest to do with autoinstaller of PLESK.
The below is already done as mentioned in my previous post:
cd /var/www/vhosts/yourdomain.com/httpdocs/
ls -al (to see the user)
chown yourusername:psacln * -R (be sure you are in the correct domain folder (use eventually pwd to see this)
and i changed the php mode to "application CGI" and now all is OK(ftp+apache are running both correctly).

My question is if this solution is the best one or not? Maybe I can have another configuration which will run better in terms of speed. I read some posts where it is written that the "application CGI" mode is slowing down the system.

Could you please comment on that?

Br,
Art J
 
by the way, i can see that php-fpm is installed:

rpm -qa | grep 'fpm'
php-fpm-5.4.16-36.1.el7_2.1.x86_64
psa-phpfpm-configurator-1.0.0-cos7.build1205160218.11.x86_64

but in the plesk GUI i cannot see this mode in order to enable it. Could you please let me know how this happen?

Br,
Art J
 
Back
Top