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

Posted by heyster on 10/22/06 11:25

On 21 Aug 2005 12:55:00 -0700, jonathanmcdougall@gmail.com wrote:

>I have read many posts on this subject and found no satisfying answer.
>
>I am creating a file on the server via a PHP script. The file is
>created using GD (imagejpeg()), though I don't think it is specific to
>GD.
>
>Here is what I understand so far:
> 1) a PHP script runs in the webserver user space. In my case, this is
> 'apache', though I think 'nobody' is quite frequent also.
> 2) creating a file from the script makes the "current" user its owner;
>in this
> case, it is also 'apache'
> 3) for a reason I don't get, this file will get a permission rx-------
> 4) using ftp solves the problem
>
>Now, this is a problem to me. I need to create a file which will have
>the same owner as if I uploaded it by ftp. IIUC, I cannot use GD with
>ftp. More generally, I would prefer to avoir ftp.
>
>The server is running in safe mode, it may cause additional problems I
>am not aware of.
>
>chmod and chown are disabled.
>
>Therefore, I need a way to create a file (specifically with GD) which
>*I* will own, as if I uploaded it by ftp.
>
>This is getting quite urgent so a quick answer would be appreciated,
>though I understand my time is not more valuable than yours.
>
>Thank you,
>
>
>Jonathan

Here's a far-out suggestion (that means it's untested), but what about
using PHP's built-in ftp functions such as ftp_chmod to set
permissions as needed.

Good luck!

heyster

 

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

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