Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #7106

Re: Only Allow exec in CLI

From Jerry Stuckle <jstucklex@attglobal.net>
Newsgroups comp.lang.php
Subject Re: Only Allow exec in CLI
Date 2012-09-23 22:26 -0400
Organization A noiseless patient Spider
Message-ID <k3ogcf$jjk$1@dont-email.me> (permalink)
References <1f781456-ae7b-441a-9a07-237a5a99624d@googlegroups.com> <W8idndcs2oi9L8LNnZ2dnUVZ_sSdnZ2d@posted.internetamerica> <a4b4e78a-a3d1-469b-83a6-825283a023e4@googlegroups.com>

Show all headers | View raw


On 9/23/2012 9:30 PM, cph wrote:
> On Sunday, September 23, 2012 6:06:41 PM UTC-7, Gordon Burditt wrote:
>>> For security I am looking to add exec() and similar commands to
>>
>>> the disable functions setting in php.ini but I do have a need to
>>
>>> execute command line commands within a cron job I am writing in
>>
>>> PHP. I believe I heard this is possible but I would just like to
>>
>>> confirm this or find a workaround.
>>
>>
>>
>> You can specify a directory to look for php.ini on the command line
>>
>> ( -c <directory> ) for the CLI version of PHP.  Thus, that cron job
>>
>> can use a completely different php.ini with different configuration
>>
>> than any other use of PHP.  Does that meet your requirements?
>>
>> Use the --ini option to find out what files it's actually loading.
>>
>>
>>
>> You might want to put the job in a wrapper shell script.
>
> For security I assume there is no way for a php script on the server to switch to the php.ini that has exec() enabled.
>
> That is, if a customer has ftp access to a site for them, they are forced to use the php.ini setup that disables it.
>

There is no way if your system administrator has properly set up Linux 
security.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Only Allow exec in CLI cph <cloudpresshosting@gmail.com> - 2012-09-23 16:14 -0700
  Re: Only Allow exec in CLI gordonb.1zi9u@burditt.org (Gordon Burditt) - 2012-09-23 20:06 -0500
    Re: Only Allow exec in CLI cph <cloudpresshosting@gmail.com> - 2012-09-23 18:30 -0700
      Re: Only Allow exec in CLI Jerry Stuckle <jstucklex@attglobal.net> - 2012-09-23 22:26 -0400
  Re: Only Allow exec in CLI "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-09-24 13:07 +0200
    Re: Only Allow exec in CLI The Natural Philosopher <tnp@invalid.invalid> - 2012-09-24 12:43 +0100
      Re: Only Allow exec in CLI Erwin Moller <erwinmollerusenet@xs4all.nl> - 2012-09-24 14:08 +0200
        Re: Only Allow exec in CLI Michael Vilain <vilain@NOspamcop.net> - 2012-09-24 10:45 -0700
          Re: Only Allow exec in CLI Michael Fesser <netizen@gmx.de> - 2012-09-24 23:57 +0200
      Re: Only Allow exec in CLI "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-09-24 14:16 +0200
      Re: Only Allow exec in CLI Tim Streater <timstreater@greenbee.net> - 2012-09-24 13:19 +0100
        Re: Only Allow exec in CLI The Natural Philosopher <tnp@invalid.invalid> - 2012-09-24 13:54 +0100
          Re: Only Allow exec in CLI Erwin Moller <erwinmollerusenet@xs4all.nl> - 2012-09-24 16:04 +0200
            Re: Only Allow exec in CLI The Natural Philosopher <tnp@invalid.invalid> - 2012-09-24 15:14 +0100
            Re: Only Allow exec in CLI The Natural Philosopher <tnp@invalid.invalid> - 2012-09-24 16:09 +0100
              Re: Only Allow exec in CLI Tim Streater <timstreater@greenbee.net> - 2012-09-24 19:07 +0100
          Re: Only Allow exec in CLI crankypuss <no@email.thanks> - 2012-09-25 02:47 -0600
            Re: Only Allow exec in CLI The Natural Philosopher <tnp@invalid.invalid> - 2012-09-25 11:00 +0100
              Re: Only Allow exec in CLI crankypuss <no@email.thanks> - 2012-09-25 04:35 -0600
                Re: Only Allow exec in CLI Tim Streater <timstreater@greenbee.net> - 2012-09-25 11:44 +0100
                Re: Only Allow exec in CLI crankypuss <no@email.thanks> - 2012-09-25 05:31 -0600
                Re: Only Allow exec in CLI The Natural Philosopher <tnp@invalid.invalid> - 2012-09-25 12:27 +0100
                Re: Only Allow exec in CLI Tim Streater <timstreater@greenbee.net> - 2012-09-25 12:41 +0100
                Re: Only Allow exec in CLI The Natural Philosopher <tnp@invalid.invalid> - 2012-09-25 12:52 +0100
                Re: Only Allow exec in CLI Tim Streater <timstreater@greenbee.net> - 2012-09-25 14:23 +0100
                Re: Only Allow exec in CLI The Natural Philosopher <tnp@invalid.invalid> - 2012-09-25 14:46 +0100
                Re: Only Allow exec in CLI Tim Streater <timstreater@greenbee.net> - 2012-09-25 15:55 +0100
                Re: Only Allow exec in CLI The Natural Philosopher <tnp@invalid.invalid> - 2012-09-25 16:13 +0100
                Re: Only Allow exec in CLI The Natural Philosopher <tnp@invalid.invalid> - 2012-09-25 15:05 +0100
                Re: Only Allow exec in CLI The Natural Philosopher <tnp@invalid.invalid> - 2012-09-25 15:05 +0100
                Re: Only Allow exec in CLI crankypuss <no@email.thanks> - 2012-09-25 12:16 -0600
                Re: Only Allow exec in CLI Jerry Stuckle <jstucklex@attglobal.net> - 2012-09-25 08:10 -0400
                Re: Only Allow exec in CLI Jerry Stuckle <jstucklex@attglobal.net> - 2012-09-25 07:45 -0400
                Re: Only Allow exec in CLI Anders Wegge Keller <wegge@wegge.dk> - 2012-09-25 14:57 +0200
                Re: Only Allow exec in CLI Jerry Stuckle <jstucklex@attglobal.net> - 2012-09-25 09:03 -0400
                Re: Only Allow exec in CLI Anders Wegge Keller <wegge@wegge.dk> - 2012-09-25 15:37 +0200
                Re: Only Allow exec in CLI Jerry Stuckle <jstucklex@attglobal.net> - 2012-09-25 12:10 -0400
                Re: Only Allow exec in CLI Anders Wegge Keller <wegge@wegge.dk> - 2012-09-25 18:25 +0200
                Re: Only Allow exec in CLI Jerry Stuckle <jstucklex@attglobal.net> - 2012-09-25 14:24 -0400
                Re: Only Allow exec in CLI crankypuss <no@email.thanks> - 2012-09-25 12:38 -0600
                Re: Only Allow exec in CLI Anders Wegge Keller <wegge@wegge.dk> - 2012-09-25 20:45 +0200
                Re: Only Allow exec in CLI Jerry Stuckle <jstucklex@attglobal.net> - 2012-09-25 16:08 -0400
                Re: Only Allow exec in CLI Michael Fesser <netizen@gmx.de> - 2012-09-25 15:12 +0200
                Re: Only Allow exec in CLI Anders Wegge Keller <wegge@wegge.dk> - 2012-09-25 15:39 +0200
                Re: Only Allow exec in CLI The Natural Philosopher <tnp@invalid.invalid> - 2012-09-25 14:35 +0100
      Re: Only Allow exec in CLI megazzorro <megazzorro.5jed61@no-mx.httppoint.com> - 2012-09-24 08:22 -0400
      Re: Only Allow exec in CLI crankypuss <no@email.thanks> - 2012-09-25 02:39 -0600
        Re: Only Allow exec in CLI Martin Leese <please@see.Web.for.e-mail.INVALID> - 2012-09-25 09:10 -0600
          Re: Only Allow exec in CLI The Natural Philosopher <tnp@invalid.invalid> - 2012-09-25 16:17 +0100
          Re: Only Allow exec in CLI crankypuss <no@email.thanks> - 2012-09-25 12:20 -0600
            Re: Only Allow exec in CLI The Natural Philosopher <tnp@invalid.invalid> - 2012-09-25 19:32 +0100
      Re: Only Allow exec in CLI Ryan <rbilesky@gmail.com> - 2012-09-27 10:23 -0700

csiph-web