|
Posted by J.O. Aho on 08/23/07 16:25
Séverin Richard wrote:
> Hi all,
>
> I want to copy one file to another location with php.
>
> My pb is that the original file is in /home/diamon/ user diamon:users
> And i want to send it to /home/green/ user green:users.
You can use either php functions to read/write files and chmod() to change
ownership, or use the system commands with exec().
> My php script has not efficient right to do that. What can i do??
If your script isn't run by green or root, it won't have the right to write in
~green/, unless you change the ownership or privileges of ~/green before you
run the script.
chmod 777 ~green
> cgi and exec() are the way i'm searching in for now... More idears?
When using a real multiuser environment, you won't get around without doing
things the right way.
If you run the script from a web browser, then doing an auth before using the
script, will allow the script be run as the user as whom you have authed.
--
//Aho
[Back to original message]
|