User cronjobs and permissions to apache:apache folders

PaulPrecept

New member
Joined
Jun 10, 2015
Messages
4
Hi,

For some time I have used chown apache:apache to tmp folders in my CakePHP sites and it works great.

However, if I run a cronjob as the user, there are permissions errors trying to write to these tmp folders.

Is there a way to make this work?

Thanks, Paul
 
Hello Paul,

CustomBuild 1.1, 1.2, 2.x support PHP-CGI as suPHP. Using PHP-CGI will make all scripts to run from a name of their respective owners, thus no need to chown to apache:apache.

CustomBuild 2.x supports PHP-CLI+mod_ruid2, which will do the same as PHP-CGI regarding names from which scripts are executed.

So you should probably choose one of these options to solve an issue with permissions.
 
Guidance on using PHP-CGI

Hi zEitEr,

Thanks for getting back to me on this and sorry for taking so long to come back to the topic. I moved onto another project, then another, then another and just coming back to this now.

I've checked and we have CustomBuild 1.2.39 so started looking into how I can use PHP-CGI. A search brought me to this forum thread: https://forum.directadmin.com/showthread.php?t=29483

This is a lot of work with a lot of questions relating to security within it. I would be worried about making server wide changes which will likely affect a number of my client's existing sites.

Is there a more complete/current guide or a way to install suPHP alongside a CLI setup and use it on specific sites?
 
Back
Top