You are here: Re: file creation: ownership « PHP Programming Language « IT news, forums, messages
Re: file creation: ownership

Posted by Colin McKinnon on 08/22/05 14:14

Jonathan Mcdougall wrote:

>
>> Maybe the best option is to look at why you think you need to create a
>> file owned by the ftp account which you didn't really explain in your
>> post.
>
> I am hosting a blog on which I can upload pictures. Uploading is done
> in two parts: first an applet uploads the picture by ftp and then a php
> script creates thumbnails with GD. The java applet is fine (uses ftp,
> of course) but the php script (gd) creates file having the owner
> 'apache'. There is the problem.
>

Nope, I don't get why this is a problem - unless PHP can't access the images
becuase the FTPd is also set to save files 0600 (is chmod in ftp disabled
too?).

> An obvious solution would be to have the java applet making the
> thumbnail, but I would like to keep the current setup (a pain to
> modify).
>

Sounds like the problem is the permissions with the ftpd which you're trying
to fix from PHP.

quick suggestions:

1) upload the file using HTTP (ftp is just BAD anyway)
2) upload the file to a temporary area using ftp then have you PHP file scan
the area for new files and copy them (with the permissions of the
webserver) to the 'live' area.

C.

 

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

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