[ILUG] PHP Question - exec()

Juan Villavicencio juancarlos at AteneaSoluciones.com
Wed Jun 1 16:56:51 IST 2005


you can use, sudo, then you can say "apache can run commands of xxxx, any, 
etc..."

see it in /etc/

+--------------------------------------------------------------+
|        Edit /etc/sudoers           ----------->     visudo |
----------------------------------------------------------------
| apache   ALL=NOPASSWD:/sbin/iptables                         |
| apache   ALL=NOPASSWD:/sbin/iptables-save                    |
| apache   ALL=NOPASSWD:/sbin/iptables-restore                 |
| apache   ALL=NOPASSWD:/usr/bin/mysqldump                     |
| apache   ALL=NOPASSWD:/bin/tar                               |
| apache   ALL=NOPASSWD:/usr/bin/zipinfo                       |
| apache   ALL=NOPASSWD:/usr/bin/unzip                         |
+--------------------------------------------------------------+

you can use visudo....


Cualquier pregunta no duden en contactarnos,


Atentamente,


Juan Carlos Villavicencio Barrezueta
AteneaSoluciones S.A.
juancarlos at AteneaSoluciones.com
_______________________________________________
Amazonas 258 y Jorge Washington
Oficina 1A Edificio Pierre Hitti
Quito-ECUADOR
++593-2-2507161
++593-2-2507164
++593-9-9223545

----- Original Message ----- 
From: "Pangurban" <pangurban at eircom.net>
To: <ilug at linux.ie>
Sent: Friday, June 03, 2005 10:03 AM
Subject: Re: [ILUG] PHP Question - exec()


>
> Thank you Kae.
>
> A wee tweek of the permissions -> chmod o+rw /dev/ttyS0 - which is the
> port heyu works with solved my last problem.
>
> Kae Verens wrote:
>
>> Pangurban wrote:
>>
>>> Turning off selinux has had an effect.
>>>
>>> whoami - produces "apache" when test.php is called from the browser
>>> but
>>> heyu info - produces an empty array and a return value of 1
>>>
>>> While from the command line - php /var/www/html/test.php
>>>
>>> whoami - produces "apache"
>>> and
>>> heyu info - produces a populated array (the print that it produces when
>>> called  from the command line) and a return value of 0
>>>
>>>
>>
>> what about logs?
>>
>> call your script, then do
>> ls -tr /var/logs
>> to find out what logs were affected by it, and tail the affected ones.
>> there may be a clue there.
>>
>> Kae
>>
>>
>>
>
> -- 
>
>
> Regards,
>
>
> Brian -- In Ireland
>
>
>
>
>
>
>
>
> 


-- 
Este mensaje ha sido analizado por MailScanner
en busca de virus y otros contenidos peligrosos,
y se considera que esta limpio.
MailScanner agradece a transtec Computers por su apoyo.




More information about the ILUG mailing list