You are here: Re: Change user for fopen « PHP Programming Language « IT news, forums, messages
Re: Change user for fopen

Posted by Simon Niederberger on 03/06/06 19:41

My solution was this:

Access file via local FTP. This will set the owner / group according to the
FTP login. Obviously, this requires FTP access to the file location.

Simon

"Simon Niederberger" <simon@sincore.ch> wrote in message
news:440195bc@news201.datazug.ch...
> Hi all
>
> I need to write a script which overwrites certain .php files in the
> current directory. Running as www user, I get a Permission denied on
> fopen. Obviously, I could CHMOD all files to allow for writing of the www
> group. However, I guess this would be quite a security flaw, so here's
> what I'd like to do:
>
> Change "running" user from www to root (or any other user), do fopen /
> fwrite / fclose, change user back.
>
> (How) Can I do this with PHP?
>
> Thanks a lot
> Simon
>

 

Navigation:

[Reply to this 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

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