[nycphp-talk] system commands and backups

Analysis & Solutions danielc at
Tue Mar 4 20:03:52 EST 2003

Hey Mark:

On Tue, Mar 04, 2003 at 05:37:52PM -0500, Mark Armendariz wrote:

> So here's my question.  Is there a way to allow a php script to run
> shell commands as an admin or specific user?

Have a copy of PHP installed as a standalone binary.  Write a PHP CGI, or
better yet, PHP CLI script that does what you want.  Put the script into
a directory of the user you want the script to run as.  Just to be clear,
I mean their shell user directory, not their web directory.  Now, call
the script via the crontab of that same user.



               PHP classes that make web design easier  | |
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7th Ave #4AJ, Brooklyn NY    v: 718-854-0335   f: 718-854-0409

More information about the talk mailing list