You are here: RE: [PHP] reading/writing files outside of web root « PHP « IT news, forums, messages
RE: [PHP] reading/writing files outside of web root

Posted by Phil Ewington - 43 Plc on 02/17/05 13:54

> Jason Wong wrote:
> > On Wednesday 09 February 2005 02:31, Richard Lynch wrote:
> >> Phil Ewington - 43 Plc wrote:
> >> > For some reason user_prefs will not open
> >> > for read/write even when I tested it under apache.apache and chmod'd
> >> > to 755,
> >> > perhaps because /home is owned by root?
> >>
> >> Something went wrong with this test.
> >>
> >> You SHOULD have been able to read/write that file in PHP, assuming
> >> 'apache' is the user PHP runs as. Use http://php.net/phpinfo to
> >> confirm that it really *IS* 'apache' user that's running apache/php.
> >
> > It *will* fail if apache has no access to $HOME!
>
> I stand corrected.
>
> In addition to read/write access to the file itself, Apache must have at
> least eXecute (directory listing) permission to the directory containing
> that file.
>
> /home being owned by root is not the issue -- But if it's not something
> the apahce user can 'ls /home' and get the contents of, then you've got a
> problem.

Thanks for all the input guys. The cron job suggestion is a great idea and I
will go with this over using sudo. Thanks again.

- Phil Ewington.
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.8.8 - Release Date: 14/02/2005

 

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

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