Reply to Re: copy right

Your name:

Reply:


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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация