I'm happy to report this is working now!
To recap the adventure for those of you who arrived late...:-)
CentOS 6.2. as shipped with PHP 5.3.3. Out of the box I couldn't execute a
PHP function (exec or system) to do an rsync with a remote host. The reason
was that Apache runs as user apache and do
> # grep apache /etc/passwd
> apache:x:48:48:Apache:/var/www:/sbin/nologin
>
> You suggesting I change apache to just another user, like this?
> apache:x:48:48:Apache:/var/www:/bin/bash
Yes, though I'd make its own home directory, /home/apache, and give
appropriate rights as needed to the doc roo
# grep apache /etc/passwd
apache:x:48:48:Apache:/var/www:/sbin/nologin
You suggesting I change apache to just another user, like this?
apache:x:48:48:Apache:/var/www:/bin/bash
Maybe generate apache's own set of ssh keys to access the remote server for
rsync?
Thanks,
David Roth
On Sun, Jun 24,
Often the Apache user isn't created with a home directory etc. Check the
passwd file to ensure its a full user with a home and shell?
Security is another question :)
On Jun 24, 2012 6:52 PM, "David Roth" wrote:
>
>
> On Sun, Jun 24, 2012 at 11:50 AM, Hans Zaunere wrote:
>
>> > I'm developing a
On Sun, Jun 24, 2012 at 11:50 AM, Hans Zaunere wrote:
> > I'm developing a small utility web page to run on my own server which is
> > running CentOS 6.2 and Apache. PHP 5.3.3.
> >
> > I tried using from PHP the exec function and also system, but after
> checking
> > the results nothing is return
try specifying the entire path to /usr/bin/rsync in your exec command line.
~Rolan
On 6/24/2012 8:51 AM, David Roth wrote:
I'm developing a small utility web page to run on my own server which
is running CentOS 6.2 and Apache. PHP 5.3.3.
I tried using from PHP the exec function and also system
> I'm developing a small utility web page to run on my own server which is
> running CentOS 6.2 and Apache. PHP 5.3.3.
>
> I tried using from PHP the exec function and also system, but after checking
> the results nothing is returned. However, when I ran a little fragment of
> this PHP code from th
Hi David,
I do not have installed Linux on my computer, maybe this link should help:
https://www.centos.org/modules/newbb/viewtopic.php?topic_id=36419
Best Regards,
Sasa
From: talk-boun...@lists.nyphp.org [mailto:talk-boun...@lists.nyphp.org] On
Behalf Of David Roth
Sent: Sunday, J
I'm developing a small utility web page to run on my own server which is
running CentOS 6.2 and Apache. PHP 5.3.3.
I tried using from PHP the exec function and also system, but after
checking the results nothing is returned. However, when I ran a little
fragment of this PHP code from the command l