Hello everyone, I've setup a vps running CentOS and IspConfig using The perfect server Guide- ISPConfig/CentOS6.4 One of the accounts I have made I am setting up a prestashop store, all has gone well however I am having issues with being able to upload files from the backoffice within prestashop, the reason being is the file ownership is set to web13:client0, and I believe that the apache user (apache:apache) requires ownership over these files/folders in order to be able to write to them. I tried running "chown -R spache:apache /"webrootURLEnteredhere" however this resulted in an error about missing files when trying to load the website. Does anyone have any ideas? I have limited linux experience, but I'm thinking that perhaps the permissions of web13:client0 need elevating, am I on the right track here? any advice would be greatly appreciated. Cheers
The permission web13:client0 are correct, the files and folders have to be owned by the web user and client group of the website. Do not run chown to apache o you will break the webiste plus open up a securoty hole that allows the site to be attacked. I guess that you use a wrong php mode in that site or that suexec is disabled. the correct settings for a website that runs a cms system or shop are: php-mode: php-fcgi or php-fpm suexec: on
Thanks for the reply Till, I have checked each of my sites and the ph mode is :fast-cgi and suexec is checked, however do I need to configure settings elsewhere in apache or elsewhere to enable suexec and fast cgi? or is there a way I can check they are functioning correctly?
No. add info.php file in your website with the following content: <?php phpinfo(); ?> and chown the file to the web user and client group of that site, thenopen it in the browser.yu can see the php mode used by that site in the phpinfo output.
I believe fast-cgi is enabled ok, but I can't find any reference to SUEXEC in my info.php file, all the reading I have done suggests that suexec only has to be enabled in the vhosts file, which i'm guessing ispconfig does when I tick the SuExec box for the respective site, the confusing thing is apache's site says SUexec is not installed by default, but there seems to be no mention of installing it. here is my info file, http://occasionhampers.com.au/info.php, do you have any hints on where I can look next?
the phpinfo output is ok and suexec is on, when you installed your server as described in our perfect server tutorials. you can test it like this: add a new php file with the name write.php and the content: <?php touch('test.txt'); ?> chown the file to the web user and then open the file in the web browser. adterwards you should fine a file test.txt in the same directory weere you put the write.php file and the test.txt file should be owned by the web user and client group of that website.
thanks till, once I realised I needed to give the write.php file execute it worked, so I think you've helped me rule out suexec being the issue. I'm still thinking it must be something server side though, as I setup another site on the same server and installed wordpress and i'm getting the same 500 error i'm getting in Prestashop when uploading files from the admin panel. I've checked and the owner is set correctly. Is there something else that could be producing this 500 error on both wordpress and Prestashop?
Most likely a wrong setting on php.ini. Check the error.log of the website for the reason of the php error.