The Joomla! Forum ™



Forum rules


Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.



Post new topic Reply to topic  [ 34 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Tue Mar 08, 2011 7:37 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Sun Jun 08, 2008 7:56 pm
Posts: 179
Location: Montreal
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!

_________________
iDanny
www.6degres.ca - 6degres
Évoluez sur le 3W!


Top
 Profile  
 
PostPosted: Wed Mar 09, 2011 11:27 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Mar 09, 2011 11:14 pm
Posts: 12
Location: Greece
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


Top
 Profile  
 
PostPosted: Thu Mar 10, 2011 4:01 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Thu Mar 10, 2011 4:00 pm
Posts: 1
Life saver.


Top
 Profile  
 
PostPosted: Sun Mar 13, 2011 3:48 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Mon Feb 01, 2010 4:19 am
Posts: 1
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]


Top
 Profile  
 
PostPosted: Sat Apr 02, 2011 1:48 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Sun Jun 08, 2008 7:56 pm
Posts: 179
Location: Montreal
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

_________________
iDanny
www.6degres.ca - 6degres
Évoluez sur le 3W!


Top
 Profile  
 
PostPosted: Thu Apr 07, 2011 10:12 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Tue Sep 28, 2010 7:04 am
Posts: 201
Location: Melbourne, Australia
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.

_________________
http://www.xeont.com.au - Computer Parts | Forum
http://www.chicshop.com.au - ChicShop


Top
 Profile  
 
PostPosted: Thu Jun 02, 2011 7:44 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sun Oct 07, 2007 8:18 pm
Posts: 29
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.


Top
 Profile  
 
PostPosted: Mon Jun 06, 2011 9:15 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Apr 15, 2009 10:26 pm
Posts: 38
Thanks for this post, works fine.


Top
 Profile  
 
PostPosted: Sat Jun 25, 2011 6:05 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sat Feb 24, 2007 11:27 pm
Posts: 42
suggestions for running plesk 8.6.0 ? that does NOT have the FastCGI component enabled?


Top
 Profile  
 
PostPosted: Tue Jul 05, 2011 6:55 am 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Tue Sep 28, 2010 7:04 am
Posts: 201
Location: Melbourne, Australia
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

_________________
http://www.xeont.com.au - Computer Parts | Forum
http://www.chicshop.com.au - ChicShop


Top
 Profile  
 
PostPosted: Tue Feb 21, 2012 5:37 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon Aug 23, 2010 6:58 pm
Posts: 38
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!..


Top
 Profile  
 
PostPosted: Tue Feb 21, 2012 3:39 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Tue Sep 28, 2010 7:04 am
Posts: 201
Location: Melbourne, Australia
hi samlf3rd,

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

Regards,
Xeont

_________________
http://www.xeont.com.au - Computer Parts | Forum
http://www.chicshop.com.au - ChicShop


Top
 Profile  
 
PostPosted: Tue Feb 21, 2012 3:57 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon Aug 23, 2010 6:58 pm
Posts: 38
I am using Plesk 10.2.0
Godaddy Virtual Dedicated Server
That worked for me.


Top
 Profile  
 
PostPosted: Tue Feb 28, 2012 3:50 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Thu Nov 17, 2011 6:25 pm
Posts: 3
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?


Top
 Profile  
 
PostPosted: Tue Feb 28, 2012 4:03 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Tue Sep 28, 2010 7:04 am
Posts: 201
Location: Melbourne, Australia
what is the plesk version you are using?

_________________
http://www.xeont.com.au - Computer Parts | Forum
http://www.chicshop.com.au - ChicShop


Top
 Profile  
 
PostPosted: Tue Feb 28, 2012 4:10 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Tue Sep 28, 2010 7:04 am
Posts: 201
Location: Melbourne, Australia
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.

_________________
http://www.xeont.com.au - Computer Parts | Forum
http://www.chicshop.com.au - ChicShop


Top
 Profile  
 
PostPosted: Tue Feb 28, 2012 7:46 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon Aug 23, 2010 6:58 pm
Posts: 38
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


Top
 Profile  
 
PostPosted: Sun Jun 17, 2012 2:54 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Sun Jun 17, 2012 2:50 pm
Posts: 4
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?


Top
 Profile  
 
PostPosted: Mon Jun 18, 2012 1:14 am 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Tue Sep 28, 2010 7:04 am
Posts: 201
Location: Melbourne, Australia
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

_________________
http://www.xeont.com.au - Computer Parts | Forum
http://www.chicshop.com.au - ChicShop


Top
 Profile  
 
PostPosted: Thu Jun 28, 2012 8:18 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Sun Jun 17, 2012 2:50 pm
Posts: 4
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


Top
 Profile  
 
PostPosted: Thu Jun 28, 2012 8:36 am 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Tue Sep 28, 2010 7:04 am
Posts: 201
Location: Melbourne, Australia
Jeveski
If you need any help let me know, I had the same problem and I know how annoying it can get.
Regards
Xeont

_________________
http://www.xeont.com.au - Computer Parts | Forum
http://www.chicshop.com.au - ChicShop


Top
 Profile  
 
PostPosted: Sun Jul 01, 2012 12:12 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sun Jan 04, 2009 7:25 am
Posts: 15
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.


Top
 Profile  
 
PostPosted: Tue Jul 17, 2012 9:55 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Tue Jul 17, 2012 8:59 am
Posts: 2
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!


Top
 Profile  
 
PostPosted: Sun Jul 22, 2012 3:46 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Thu Feb 14, 2008 11:19 am
Posts: 106
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 :(


Top
 Profile  
 
PostPosted: Sun Jul 22, 2012 6:00 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sun Jan 04, 2009 7:25 am
Posts: 15
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.


Top
 Profile  
 
PostPosted: Wed Jul 25, 2012 8:28 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Tue Jul 17, 2012 8:59 am
Posts: 2
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/PP10/parallels-plesk-panel-10-linux-updates-release-notes.html#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!


Top
 Profile  
 
PostPosted: Sat Nov 24, 2012 9:35 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Mar 12, 2008 1:06 pm
Posts: 28
Location: France, UE
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:
Quote:
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
Quote:
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


Top
 Profile  
 
PostPosted: Sun Nov 25, 2012 11:06 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri May 29, 2009 8:34 pm
Posts: 40
Location: Bolton UK
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


Top
 Profile  
 
PostPosted: Sun Dec 02, 2012 11:31 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Sun Dec 02, 2012 11:23 am
Posts: 1
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.


Top
 Profile  
 
PostPosted: Wed Dec 05, 2012 2:34 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Mar 12, 2008 1:06 pm
Posts: 28
Location: France, UE
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 34 posts ]  Go to page 1, 2  Next



Who is online

Users browsing this forum: No registered users and 23 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group