Re: getting php to run as another user?

From: Nikolai Chuvakhin (nc_at_iname.com)
Date: 09/24/04


Date: 24 Sep 2004 08:08:19 -0700

cool <coo@goontrytospamme.dk> wrote in message
   news:<pan.2004.09.24.06.25.54.347689@goontrytospamme.dk>...
>
> I need to have my PHP script move uploaded files from the server where the
> php scripts are (Linux, with Apache 2 and PHP 4.2.2), to another machine,
> which is a Windows machine. Our Windows system administrator will set up
> a user named "george" or something, who will have the permission to write
> files to the target directories on the windows machine.

OK, but what is the nature of the network connection between the two
machines? It seems your options are FTP (PHP has support for it) and
SMB, aka Windows networking (if you can activate smbclient on your
Linux machine, you will be able to log into the Windows machine with
a user name and password).

> But PHP running as an Apache module runs as user "apache"
> (this is what I set up apache to call itself).

It doesn't matter. The Windows machine has its own authorization
mechanism, independent from that on the Linux machine. You need
to figure out which protocol you will use for the transfer (FTP
or SMB, as suggested above, or maybe something else), and act
accordingly.

Cheers,
NC



Relevant Pages

  • Re: basic question about assigning ip address
    ... - boot the Windows machine only (Linux machine off). ... Is the Internet connection working ...
    (Fedora)
  • Re: Setting Up NTP for Time Sync
    ... >> whether SNTP will interoperate with NTP on the linux machines I ... >> machine has a direct connection to the net, but the Linux machine can ... >> connect only via phone modem but it has a direct connection to the win ... what you really want to do then is to make your windows machine ...
    (comp.os.linux.networking)
  • Re: Setting Up NTP for Time Sync
    ... > not support ntp as a server. ... > connection between your linux machine and your windows machine. ... I do not need it connected to the internet all day. ...
    (comp.os.linux.networking)
  • Re: using linux with windows internet connection sharing
    ... >> windows machine to connect the network to the internet via a usb DSL ... >> The linux machine is getting its IP address and gateway OK using DHCP, ... i.e. dhcp has set up the windows machine as a DNS relay. ... > to set up a DHCP server on the 'Doze machine, ...
    (comp.os.linux.misc)
  • Small SOHO email setup on Rh7.3
    ... I can telnet into the Linux machine from my Windows ... I cannot telnet to port 25 port from any Windows machine. ...
    (comp.os.linux.misc)