Page 1 of 2

Joomla and Plesk CAN co-exist !

Posted: Tue Mar 08, 2011 7:37 pm
by iDanny
To all of you who use Parallel Plesk as a hosting control panel, you’ll be glad to read this post.

Finally, after a year of permissions and ownership problems, I managed to better understand and successfully setup Joomla on Plesk without having to compromise security by 777’ing directories or files!

So essentially, it goes like this:

If you’re using Plesk, your domain parameters will allow you to set the domain to use FastCGI as a PHP interpreter. BY ALL MEANS, DO IT! By setting this, you are forcing PHP to run as the FTP user and not the Apache user. This is the source of problems when using Plesk to work with PHP solutions! The only way around it is to set directories to 777 ... which is a MAJOR faux pas!

So, now that PHP is running as the FTPuser, you can leave ALL files to 644 and ALL directories to 755 which is what the Joomla standards suggest. Your Joomla instance (running PHP as the FTPuser) will now be able to write in your domain without spurring out a bunch of permission problems anymore.

That being said, I needed to change my PHP.ini file to save sessions information in the Apache /tmp directory. I also had to pump up memory limit and max execution time a little (this is relative to your needs of course).

Also, it's worth mentioning that you DON'T need the FTP layer activated when operating this way. Turn it off! Many extension developers have told me that the FTP layer will cause problems during their install (not sure why exactly). I suppose it has something to do with file ownership issues (still not sure).

So “voila”! Since this new configuration, I’ve been installing Joomla securely as well as extension without problems so far!

Hope this helps!

Re: Joomla and Plesk CAN co-exist !

Posted: Wed Mar 09, 2011 11:27 pm
by diasite
Thank you very very much for that post !!!! I have recently started to use Plesk and I could not understand what was going wrong with permissions. I will try your suggestions and I am sure that they will work, as I understand you have spend much time searching. Thanks again for sharing ;D

Re: Joomla and Plesk CAN co-exist !

Posted: Thu Mar 10, 2011 4:01 pm
by cliffkujala
Life saver.

Re: Joomla and Plesk CAN co-exist !

Posted: Sun Mar 13, 2011 3:48 pm
by timv88
Hi iDanny,

I was very glad to read this post. I recently purchased a virtual server which runs Plesk and it's been giving me headaches for the past week.

I have a question regarding the changes you mentioned to PHP.ini, is this a local php.ini in your site root or are you referring to the global php.ini located in /etc/php5/fastcgi? Could you be more specific about the value you gave the session save path?

[edit for solution]
I edited the global php.ini through ssh and set the session.save_path to "/tmp". Then I needed to update permissions for the /tmp folder:
# chmod -R 7550 /tmp

With this I was able to get a smooth install (with akeeba to be specific) with no session writing issues.
[/edit]

Re: Joomla and Plesk CAN co-exist !

Posted: Sat Apr 02, 2011 1:48 pm
by iDanny
Sorry I missed that timv88!

Yes, your solution is right.

You may want to monitor the space used in /tmp if you run many sites on the server.

Danny

Re: Joomla and Plesk CAN co-exist !

Posted: Thu Apr 07, 2011 10:12 pm
by xeont
Hi iDanny,

Thank you very much for the solution, i didnt know what to do, im very new to plesk,

could you please explain more what are the changes i should made to php.ini

i still have

Temp Directory ($tmp_path) domain.com/httpdocs/tmp/ Unwritable

thank you.

Re: Joomla and Plesk CAN co-exist !

Posted: Thu Jun 02, 2011 7:44 pm
by dw1
Here's what worked for me. Thanks for posting everyone.


Description:
Control Panel: Plesk 10
Server: Dedicated
OS: CentOS
PHP: FastCGI - NOT APACHE

Situation:
Installing multiple Joomla websites. Ownership is defaulting to "apache". Prevents moving files and directories. Prevents installation and proper tmp directories from functioning.

Initiated ssh connection.
Update permissions for the /tmp folder:
# chmod -R 777 /tmp
I had tried the 755 and did not work. Errors in Plesk panel.

Edited the global php.ini.
Set the session.save_path to "/tmp".
# cd /etc/
# nano php.ini
make a backup of the php.ini file.
find the session.save_path info in the php.ini file. I used nano to edit. nano comes with my server setup. nano is a text editor. place the "/tmp" into path. save file.

FTP your akeeba backup.
Install into temp folder.
Allow full permissions on install files prior to installing.
Once installed check ownership. It should be your ftp owner not apache.

Once installed move your Joomla files and directories to main root folder of your domain.

Re: Joomla and Plesk CAN co-exist !

Posted: Mon Jun 06, 2011 9:15 pm
by andrewrv
Thanks for this post, works fine.

Re: Joomla and Plesk CAN co-exist !

Posted: Sat Jun 25, 2011 6:05 am
by ellare
suggestions for running plesk 8.6.0 ? that does NOT have the FastCGI component enabled?

Re: Joomla and Plesk CAN co-exist !

Posted: Tue Jul 05, 2011 6:55 am
by xeont
hi diasite,

i think first you need to upgrade your php and mysql, fast-cgi does not seems to installed on your server, please intstall if you havent got it. follow iDanny instructions. that helped me. if you have anymore questions you can ask me.

Regards,
Xeont

Re: Joomla and Plesk CAN co-exist !

Posted: Tue Feb 21, 2012 5:37 am
by samlf3rd
I had to stop and pay my respects for this very helpful article. It's funny I looked for hours and searched google for Plesk and Joomla permissions, and this did it! Thank you so much. I was worried i would have to wake up in the morning and start searching again.

I logged into one of my customers control panels went to domains, clicked on the domain, and set CGI on and all my permissions were fixed in Joomla, and now I just uploaded 3 modules without any problems or Jcreate errors!
Thank you thank you!..

Re: Joomla and Plesk CAN co-exist !

Posted: Tue Feb 21, 2012 3:39 pm
by xeont
hi samlf3rd,

which Plesk version you are using, please specify, can be useful to other users

Regards,
Xeont

Re: Joomla and Plesk CAN co-exist !

Posted: Tue Feb 21, 2012 3:57 pm
by samlf3rd
I am using Plesk 10.2.0
Godaddy Virtual Dedicated Server
That worked for me.

Re: Joomla and Plesk CAN co-exist !

Posted: Tue Feb 28, 2012 3:50 pm
by cnewell
I have been having permission problems with plesk and Joomla. So I was happy to see this. However when I went to the domain I see CGI support and fast CGI support are already on.

Any suggestions?

Re: Joomla and Plesk CAN co-exist !

Posted: Tue Feb 28, 2012 4:03 pm
by xeont
what is the plesk version you are using?

Re: Joomla and Plesk CAN co-exist !

Posted: Tue Feb 28, 2012 4:10 pm
by xeont
plesk version 9 seems to have some permission problem joomla but it can be fixed, if you are using plesk version 10, you should not have any problem, version 10 offer you joomla 1.6 automatic installation.

Re: Joomla and Plesk CAN co-exist !

Posted: Tue Feb 28, 2012 7:46 pm
by samlf3rd
xeont wrote:plesk version 9 seems to have some permission problem joomla but it can be fixed, if you are using plesk version 10, you should not have any problem, version 10 offer you joomla 1.6 automatic installation.
Yes I know, but a lot of the modules, and plugins I use require 1.5. Shame

Re: Joomla and Plesk CAN co-exist !

Posted: Sun Jun 17, 2012 2:54 pm
by joveski
timv88 wrote:Hi iDanny,

[edit for solution]
I edited the global php.ini through ssh and set the session.save_path to "/tmp". Then I needed to update permissions for the /tmp folder:
# chmod -R 7550 /tmp

With this I was able to get a smooth install (with akeeba to be specific) with no session writing issues.
[/edit]

I can't find the php.ini anywhere. It's not located in the /tmp folder of Joomla
How can I access it?

I am using Joomla 2.5 on Plesk 9.5.4

This Plesk has been giving me headaches for 2 weeks now..

Would someone be so kind in telling me where could the php.ini be located?

Re: Joomla and Plesk CAN co-exist !

Posted: Mon Jun 18, 2012 1:14 am
by xeont
joveski,

php.ini located in /etc directory on the server. not anywhere in Joomla folder.

Joomla 2.5 working fine with Plesk 9.5.4, but need bit of configuration.

regards,
Xeont

Re: Joomla and Plesk CAN co-exist !

Posted: Thu Jun 28, 2012 8:18 am
by joveski
Thank you xeont..
I will apply this changes both to my PHP support and php.ini file...
If it works I will explain the procedure in great detail for everybody who is using plesk 9.5.x

Best wishes,
Joveski

Re: Joomla and Plesk CAN co-exist !

Posted: Thu Jun 28, 2012 8:36 am
by xeont
Jeveski
If you need any help let me know, I had the same problem and I know how annoying it can get.
Regards
Xeont

Re: Joomla and Plesk CAN co-exist !

Posted: Sun Jul 01, 2012 12:12 am
by netstepinc
Holy buckets...that's awesome!
Plesk with suEXE is such a PITA.
I got this to work with Joomla 2.5.6
In 9.5.4
Domain > Web Hosting Settings:
PHP support: (run as <FastCGI Application>, PHP Safe mode [ ] = unchecked.
FastCGI support (required for Ruby on Rails) [X]

Quick check is to upload something with the media manager.
Turn off jFTP.
Try to delete the item with the media manager = FAIL.
Enable FastCGI.
Try delete with Media Manager again = SUCCESS.

Re: Joomla and Plesk CAN co-exist !

Posted: Tue Jul 17, 2012 9:55 am
by Zanzo76
Hi,
i have a server which has many websites in Joomla, ranging from 1.5 to 1.7 and 2.5.
I was aware about that FastCGI setup in php.ini was the right choice to set permission to folders 755 and files 644.
Plesk version was 9.5.4 and everything was running smooth, until it was updated to 10.4.4 for security reasons.
That reverts everything to Apache module, and obviously the permissions changed. I'm not use anymore permissions set to 777 and 666 for folders and files, so i changed the settings back to FastCGI and restarted service, but it doesn't changed anything about permissions.
They still remains for Joomla 1.5 and 2.5 not writable and that is strange for me. What could it be that still retain this configuration and doesn't allow me to go smooth like before?

Thanks to everyone who could help!

Re: Joomla and Plesk CAN co-exist !

Posted: Sun Jul 22, 2012 3:46 pm
by FrankA3
It seems you have to enable FastCGI for ALL domains at domain level. If there is a way that it can be done globally it would be highly appreciated if someone could write a 'Running Joomla in Plesk for Dummies' the changes listed above are not clear enough without a bit more server understanding. I had been trying to find a pro to set up the config but they were either not available, did not reply, told me to switch to cPanel or wanted over $1000 for the job :pop

Now the hosts tell me cPanel is not an option :(

Re: Joomla and Plesk CAN co-exist !

Posted: Sun Jul 22, 2012 6:00 pm
by netstepinc
FrankA3 wrote:I had been trying to find a pro to set up the config but they were either not available, did not reply, told me to switch to cPanel or wanted over $1000 for the job. Now the hosts tell me cPanel is not an option :(
DirectAdmin is a great control panel if you have a choice.
I'm stuck with Plesk due to my host....and I hate it.

Re: Joomla and Plesk CAN co-exist !

Posted: Wed Jul 25, 2012 8:28 am
by Zanzo76
Hi!
I've been searching for solution for Plesk 10.4.4 with Joomla working with FastCGI and two days ago Plesk updated to #40 http://download1.parallels.com/Plesk/PP ... tml#104440, solving all my issues! Really strange, 'cause that update doesn't has nothing to do with permissions on files and folders... now it works like a charm...

I hope to be helpful for someone!

Re: Joomla and Plesk CAN co-exist !

Posted: Sat Nov 24, 2012 9:35 pm
by kozaki
What a nice information iDanny shared here :D (well why is it located in Joomla 1.5 forum btw?)

We came into this as the official server admin is not so active ;) Now my client Parallels Plesk 10.4.4 is not showing any option to running PHP as FastCGI. (see refs below)

Any one here have used or try Run PHP as User script rather than FastCGI?
Here is what it is said to do:
This add-on for Parallels Plesk Panel allows to run PHP scripts as domain FTP user. It only works in conjunction with mod_ruid2 or mpm-itk modules. In this case standard PHP module runs scripts. This is the fastest method unlike suPHP and FastCGI commonly used for the same purpose.
Also
Since Plesk version 10.4.4 "Run PHP as user" can handle separate subdomains as well.
Is working on Plesk for Linux, version 8.0 or higher
And it can be handled both via Plesk UI and command line :)

Well, he he I still don't know where to get that 'php-posix' they list as one of the 3 dependancies... Client has got a CentOS where yum can't find this package.

Refs:

Found this a bit more detailed how to (dv) 3.5:Run PHP as FastCGI and resolve Apache permission errors So that "Your domain will run PHP as FastCGI, with the user and group that Plesk uses for your domain site files." ...But we have no confidence these hack will stand as a secure and adequate solution while time pass by.
- Two PHP versions linux Plesk HOWTO: this thread made it to Parallels KB-Base.
- Run PHP as User : they've got that neat page with all the specs and instructions as it seems

Re: Joomla and Plesk CAN co-exist !

Posted: Sun Nov 25, 2012 11:06 pm
by clu55ter
Hello Guy this is very useful information but unfortunately I am having trouble figuring things out.

I have just moved my host provider to 1and1 cloud server and have never worked with pleask before.

My pleask version is 11.0. 9
joomla 2.5.8

I have tried switching to CGI application and FastCGI application but still having permission issues such as updates and getting errors when I try to install components such as K2.

I tried editing the php.ini file to save session time to tmp but this not work for me so I reverted back to the original php.ini just in case it caused any issues.

Would really appreciate your help.

Thanks
Tony

Re: Joomla and Plesk CAN co-exist !

Posted: Sun Dec 02, 2012 11:31 am
by markusromanus
The final piece of the puzzle for those of you having the trouble I had ( server error when trying to install any extensions)

on your plesk server add this line, FcgidMaxRequestLen 15728640

to /etc/apache2/mods-enabled/fcgid.conf
and restart apache.

also make sure the ftp layer is off in joomla.

Re: Joomla and Plesk CAN co-exist !

Posted: Wed Dec 05, 2012 2:34 pm
by kozaki
Small update after having tried a couple of methods, only one succeeded.

1) First we went the ssh way as you can see in the MediaTemple article Run_PHP_as_FastCGI_and_resolve_Apache_permission_errors
But that didn't work. Maybe the article's outdated (considering the apache directives it uses e.g. 'MaxProcessCount'), or it works only on mt (but I doubt as our client's server is quite straight, nothing special)
Still, would have been handy as I first didn't have access to the Scripts settings in Plesk, but had ssh + root access.

2) Went the Plesk way as iDanny wrote, right after we got the access to the Scripts settings for that domain in Plesk.
All went fine. Site is running 2-3 times faster than before.
As for the domain's php.ini and PHP session path, they can be handled on a domain base (i.e. no need to edit /etc/php.ini and to put session.path in apache /tmp).
- Plesk handled the domain's php.ini file after we told it to do as quoted in the Paralleles KB's guide bellow.
- We created PHP session path in <HTTPROOT>/../var/tmp: works fine. Then in the <HTTPROOT>/../private directory: works fine too, as shown in this post and parallels' guide:
fCGI var/lib/php/session Permission Issue
(Parallels KB for Plesk 10.4) PHP on domain running via CGI/FastCGI can't use session by default

Last thing, markusromanus there's no /etc/apache2/mods-enabled/fcgid.conf (everything is under /etc/httpd). Maybe it's a distro relative place.
Anyway it's running fine, installation (and update) of >1MB extension included without that line (FcgidMaxRequestLen) atm.

To all thank you very much for sharing the tip and experiences.