NYCPHP Meetup

NYPHP.org

[nycphp-talk] Writing a file and ownership

David Mintz dmintz at davidmintz.org
Sat May 7 12:31:37 EDT 2005


On Sat, 7 May 2005, csnyder wrote:

> On 5/7/05, David Mintz <dmintz at davidmintz.org> wrote:
>
> > What alternatives are there besides either making that cache directory
> > world-writeable, or chowning it to nobody:nobody?
>
> Write an ftp or sftp backend that takes the file and "uploads" it to
> your user account on the same server. That way the file is owned and
> writeable by you.
>
> Otherwise, um.... store it in a database?

Continuing with the caching example:

The database idea would be a non-starter in those cases where database
access is one of the expensive things that you're trying to avoid.

Doesn't it seem that the s?ftp cure would have to be coded with the utmost
care or it might be worse than the disease, especially on a shared host?
For example, if username/password are embedded in PHP scripts that
themselves are world-readable... It would be interesting to see an example
or psuedocode/outline showing an implementation.


---
David Mintz
http://davidmintz.org/



More information about the talk mailing list