From:             web at bartwell dot ru
Operating system: FreeBSD 8.0
PHP version:      5.4.10
Package:          Unknown/Other Function
Bug Type:         Bug
Bug description:Wrong permissions for temporary files on upload

Description:
------------
I have server with FreeBSD 8.0, Apache 2.2.23 and PHP 5.4.10. That is my
VirtualHost config:
<VirtualHost *>
    ServerName site.com
    ServerAlias www.site.com
    DocumentRoot /usr/home/site/pub/htdocs/
    php_admin_value open_basedir /usr/home/site/
    php_admin_value session.save_path 0;0660;/usr/home/site/pub/tmp/
    php_admin_value upload_tmp_dir /usr/home/site/pub/tmp/
</VirtualHost>

/usr/home/site/pub/tmp/ owned by site:www with 4770 permission. Session
files creating correctly (660 and site:www). But uploaded temporary files
creating with 600 in permissions. So, because this temporary file owned by
site:www and Apache running from www:www, move_uploaded_file() cannot move
file.

How to fix it?

I think that I need patch PHP for force set permission on this tmp file.
But where? And which internal function in PHP can to do it?

Expected result:
----------------
I want that the temporary file creating with 660 permissions (and
site:www).

Actual result:
--------------
This temporary file creating with 600 permissions (and site:www).

-- 
Edit bug report at https://bugs.php.net/bug.php?id=63968&edit=1
-- 
Try a snapshot (PHP 5.4):   
https://bugs.php.net/fix.php?id=63968&r=trysnapshot54
Try a snapshot (PHP 5.3):   
https://bugs.php.net/fix.php?id=63968&r=trysnapshot53
Try a snapshot (trunk):     
https://bugs.php.net/fix.php?id=63968&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=63968&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=63968&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=63968&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=63968&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=63968&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=63968&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=63968&r=notwrong
Not enough info:            
https://bugs.php.net/fix.php?id=63968&r=notenoughinfo
Submitted twice:            
https://bugs.php.net/fix.php?id=63968&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=63968&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63968&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=63968&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=63968&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=63968&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=63968&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=63968&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=63968&r=mysqlcfg

Reply via email to