Re: using growisofs in a PHP/HTML page

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Saturday 09 December 2006 15:17, you wrote:
> when running something through a web browser/server the command is
> being run as/by the user that the web server runs as (in a unix/apache
> environment that's generally "apache" or "nobody"). hence the likely
> difference between how this works in a terminal window (where it's
> being run as the logged in user) and the php/html page (where it's
> being run as the web server user).
>
> is "www-data" the user that your web server is running as?
>

yes, it is. 

The "mkdir /tmp/CopiaSeguranca", the "mysqldump ...", and the two "cp
..." comands, are all ok. with www-data.www-data owning the directory
and with the correct (I think) permissions.

The directory where the command is executed (where the php file is)
~fpam/public_html/BasesDados/CopiasSeguranca is writable for all.

When I tried the command in the command line, I first changed to root
(su root), and then to www-data (su www-data). And I could execute the
command without problems.

...


>
>
> ------------ Original Message ------------
>
> > Date: Saturday, December 09, 2006 02:57:05 PM +0000
> > From: Pedro Quaresma <pedro@xxxxxxxxx>
> > To: php-general@xxxxxxxxxxxxx
> > Subject:  using  growisofs in a PHP/HTML page
> >
> > Hi
> >
> > I'm trying to write a "make a backup, page". I do the backup of all
> > the databases (into /tmp/CopiaSeguranca), I do the copying of some
> > directories to /tmp/CopiaSeguranca, and then I want to write a DVD of
> > all the files in /tmp/CopiaSeguranca.
> >
> > Everything is ok, except for the last step.
> >
> > (...)
> > $saida=system("growisofs -Z /dev/hda -R -J -input-charset
> > iso8859-1 /tmp/CopiaSeguranca/",$return_value);
> > echo "<p>--- $saida --- </p>";
> > echo "<p>--- $return_value --- </p>";
> > if(!$return_value){
> >   echo "<p>Success</p>";
> >   echo"<a href=../index.html> return </a></p>";
> > }
> > else
> > echo "<p>Error.</p>";
> > (...)
> >
> >
> > The "growisofs" command does nothing... if I do the same command in a
> > bash window, in the command line everything works fine, I think that
> > the permissions are ok, I put the www-data user in the "plugdev" and
> > "cdrom" groups...
> >
> > Is it possible to use growisofs inside PHP?
>
> ---------- End Original Message ----------

-- 
    At\'e breve

Professor Auxiliar Pedro Quaresma
Departamento de Matem\'atica
Faculdade de Ci\^encias e Tecnologia
Universidade de Coimbra
P-3001-454 COIMBRA, PORTUGAL
correio-e: pedro@xxxxxxxxx
p\'agina: http://www.mat.uc.pt/~pedro/
telef: +351 239 791 181; fax: +351 239 832 568

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux