Bug #66940 [Opn]: move_uploaded_file() behavior is very inconsistent

From: Date: Sat, 22 Mar 2014 04:22:16 +0000
Subject: Bug #66940 [Opn]: move_uploaded_file() behavior is very inconsistent
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-184855@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=66940&edit=1

 ID:                 66940
 User updated by:    ryosuke_i_628 at yahoo dot co dot jp
 Reported by:        ryosuke_i_628 at yahoo dot co dot jp
 Summary:            move_uploaded_file() behavior is very inconsistent
 Status:             Open
 Type:               Bug
 Package:            *General Issues
 PHP Version:        5.6.0alpha3
 Block user comment: N
 Private report:     N

 New Comment:

Please let me make corrections.


Expected result:
----------------
new copy by php_copy_file_*
-> depends on UMASK

new rename by VCWD_RENAME
-> depends on UMASK

overwrite copy by php_copy_file_*
-> depends on UMASK

overwrite rename by VCWD_RENAME
-> depends on UMASK


or


new copy by php_copy_file_*
-> depends on its original permission

new rename by VCWD_RENAME
-> depends on its original permission

overwrite copy by php_copy_file_*
-> depends on its original permission

overwrite rename by VCWD_RENAME
-> depends on its original permission

Actual result:
--------------
new copy by php_copy_file_*
-> depends on UMASK

new rename by VCWD_RENAME
-> depends on UMASK

overwrite copy by php_copy_file_*
-> depends on its original permission

overwrite rename by VCWD_RENAME
-> depends on UMASK


Previous Comments:
------------------------------------------------------------------------
[2014-03-22 04:19:47] ryosuke_i_628 at yahoo dot co dot jp

Description:
------------
On 5.2.5 release, the following change had been committed.

+ Fixed move_uploaded_file() to always set file permissions of resulting file according to UMASK.
(Andrew Sitnikov)

However, this commit seems to be very inconsistent.
Some people say this commit is a bug (Bug #65057).

Test script:
---------------
Compare behaviors the actual implemention and what it should be.

Expected result:
----------------
new copy by php_copy_file_*
-> depends on UMASK

new rename by php_copy_file_*
-> depends on UMASK

overwrite copy by php_copy_file_*
-> depends on UMASK

overwrite rename by php_copy_file_*
-> depends on UMASK


or


new copy by php_copy_file_*
-> depends on its original permission

new rename by php_copy_file_*
-> depends on its original permission

overwrite copy by php_copy_file_*
-> depends on its original permission

overwrite rename by php_copy_file_*
-> depends on its original permission

Actual result:
--------------
new copy by php_copy_file_*
-> depends on UMASK

new rename by php_copy_file_*
-> depends on UMASK

overwrite copy by php_copy_file_*
-> depends on its original permission

overwrite rename by php_copy_file_*
-> depends on UMASK




------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=66940&edit=1


Thread (2 messages)

« previous php.bugs (#184855) next »