On Saturday 03 April 2004 03:04, Linux Zero wrote:

> I write some PHP scripts for a system's module that allows the user to
> upload a file from his computer to the host. It works fine in a server with
> Linux   Apache   MySQL   PHP (LAMP) environment. I based on the examples of
> this page:
>
> http://www.php.net/manual/en/features.file-upload.php
>
> Las week we transfer the whole system to another server with the same
> environment, but now the uploaded files can't be viewed in the browser.
> That's because the file is uploaded with 640 permissions and can't be
> opened by the browser with a wwwrun user.
>
> We check in the old server and find that these uploaded files with 644
> permissions. I check the httpd.conf and php.ini files looking for something
> like a umask option, but I find nothing like that.

umask() and/or chmod()

However it is odd, files uploaded via HTTP should be owned by the "webserver", 
which in your case ought to be 'wwwrun'? What is the user that the webserver 
is running under and who is the owner of the uploaded files?

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
Your temporary financial embarrassment will be relieved in a surprising 
manner.
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to