Re: Using system call + wrapper?

Поиск
Список
Период
Сортировка
От Viktor Fougstedt
Тема Re: Using system call + wrapper?
Дата
Msg-id Pine.GSO.4.10.10102261822020.12465-100000@peurifoy.dtek.chalmers.se
обсуждение исходный текст
Ответ на Using system call + wrapper?  (Richie <dugganr@student.cs.ucc.ie>)
Список pgsql-php
On Mon, 26 Feb 2001, Richie wrote:

> It was suggested to me to use a wrapper that invokes a system call such as
> system('sudo upload.php -p password') that will run the program in sudo
> but I really don't know where to start with this??

You should never, ever, ever run CGI-/PHP-applications as root. And
running things as root is what sudo normally does. Is that what you're
contemplating?

If so, alter the owner of the directory instead so that your ordinary
CGI-/PHP-scripts may write to it. But be _very_ careful how you write your
code. Can anybody upload things? What happens when the filesystem gets
full? Also be very careful that you do not trust any data the user
supplies, especially not with the "system" call.


/Viktor...

--|     Viktor Fougstedt, system administrator at dtek.chalmers.se     |--
--|                http://www.dtek.chalmers.se/~viktor/                |--
--| ...soon we'll be sliding down the razor blade of life. /Tom Lehrer |--


В списке pgsql-php по дате отправления:

Предыдущее
От: David Olbersen
Дата:
Сообщение: Re: Using system call + wrapper?
Следующее
От: "Mitch Vincent"
Дата:
Сообщение: Re: Using system call + wrapper?