If your PHP script is placing the files there, they are owned by the 'web'
user.  The web user doesn't have permission to change the file ownership
to you, but for your purposes all you should need to do is change the file
permissions in your PHP script after the file is uploaded:

chmod($filename, 0644);


On Thu, 17 Jan 2002, Justin French wrote:

> Hi,
> I have a script which uploads an image to a directory within web root
> (on Redhat 7.0).  Whilst the dir itself was created via FTP, the images
> of course have been written to the dir via a PHP script.
> When I try to FTP a copy of the images down to my local hard disk, I get
> "permission denied".
> What's happening here?  My guess is the following:
> Things like this performed by PHP are not attached to me (the user)...
> they're probably performed by nobody or root or something, hence I (the
> FTP user and account holder) don't own the uploaded file, and the
> permissions set for the file by default are not wide enough to permit me
> to download it, rename it, etc.
> Correct?
> So, then what do I need to do?  Does the script which uploads the file
> have to change the owner anmd permissions of the file?
> Justin French
> Indent.com.au

PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to