Re: getting php to run as another user?
From: coolsti (coo_at_goontrytospamme.com)
Date: 09/24/04
- Next message: Hilarion: "Re: Number question"
- Previous message: Craig Keightley: "Re: Number question"
- In reply to: Nikolai Chuvakhin: "Re: getting php to run as another user?"
- Next in thread: coolsti: "Re: getting php to run as another user?"
- Reply: coolsti: "Re: getting php to run as another user?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 24 Sep 2004 18:08:53 +0200
Hi NC,
thanks for your response. Here is some more information:
> OK, but what is the nature of the network connection between the two
> machines?
Both machines are on the company intranet. I administer the Linux machine
which is where the PHP script lies. I can currently mount the target
Windows drive using smbmount from the Linux machine. Currently I do this
with my own Windows user ID. In about a month the Windows machine will be
upgraded to Windows 2003, meaning I no longer can use smbmount, but need
to use CIFS instead. But this is no problem, I have successfully done a
mount in this way to another drive running from Windows 2003. To do this,
I had to patch and rebuild my Redhat 8 kernel, but that went smoothly.
So I can "see" the windows drive as just a directory on my Linux system.
But when I try this by uploading a file with my php script, the script is
not allowed to move the file to the target directory on the windows
machine. I get this error:
Warning: Unable to create '/mnt/home/windrive/testfile.html':
Permission denied
where in this case the drive "windrive" has been successfully mounted on
my Linux machine. From a terminal window I myself can place (copy or move)
files from the Linux machine to this drive. But I can't get the PHP script
to do it.
I assume the reason is because PHP is running as user "apache" and apache
does not have write permissions on the windows drive. The new user
"george" will have write permissions.
So what do I need to do? The user "george" will have permission to write
to the Windows drive, and both PHP and apache run as user "apache". The
drive itself will be mounted with "george" as the windows user using
smbmount or CIFS, and in this case when mounting, the windows password of
"george" will be supplied.
Can anyone help?
Regards,
Steve, Denmark
- Next message: Hilarion: "Re: Number question"
- Previous message: Craig Keightley: "Re: Number question"
- In reply to: Nikolai Chuvakhin: "Re: getting php to run as another user?"
- Next in thread: coolsti: "Re: getting php to run as another user?"
- Reply: coolsti: "Re: getting php to run as another user?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|