Re: Re: Upload problem - final size is different

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



   I was thinking the same thing, Richard, but didn't say anything because
of my limited experience with MacOS.  I know it's built on BSD, but to be
honest, I have no clue what may have changed over the years.


On 5/9/07, Richard Lynch <ceo@xxxxxxxxx> wrote:

On Wed, May 9, 2007 9:15 am, Eric Trahan wrote:
> After some other tests, I think the problem is with the rights of the
> file.
>
> I made tests on my personnal Mac that runs Apache/1.3.33 (Darwin) PHP/
> 4.4.4.
>
> Settings in PHP:
> file_uploads: On
> upload_tmp_dir: no value (so it uploads in /var/tmp/)
> upload_max_filesize: 2M
>
>
> My destination folder is page5, same as my server (everyone can read
> and write).  But when the files are droped in that folder, with the
> move_uploaded_file function, the owner is www and group is wheel.  So
> I can't open it...  But when I change the rights on the file, I can
> the see the images.
>
> Is there a way to change the owner or the group of a file in PHP.

There probably is a http://php.net/chown, but unless you are running
Apache as 'root' (DON'T DO THAT!) then it won't work.

However, you can use http://php.net/chmod to make the file readable by
you as well as the 'www' user.

It is very frightening, however, to see the group 'wheel' on the file,
since 'wheel' is usually reserved for users that can 'su' to root, and
having uploaded image files in that group just doesn't feel right.

--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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




--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux