[wp-trac] Re: [WordPress Trac] #10170: File Permissions on Creation (Plugin but might be Theme as well)

WordPress Trac wp-trac at lists.automattic.com
Sun Jun 28 10:47:37 GMT 2009


#10170: File Permissions on Creation (Plugin but might be Theme as well)
-------------------------------------+--------------------------------------
 Reporter:  hakre                    |        Owner:  dd32    
     Type:  defect (bug)             |       Status:  reopened
 Priority:  normal                   |    Milestone:  2.8.1   
Component:  Filesystem               |      Version:  2.8     
 Severity:  normal                   |   Resolution:          
 Keywords:  has-patch tested commit  |  
-------------------------------------+--------------------------------------

Comment(by hakre):

 @azaozz: moved umask out there, this is defenetly wrong.

 @dd32: using umask for the default permission (even if used mathematically
 as intended) does not fit here because to that value umask() will be
 automatically applied later on -again- with mkdir() and the like.

 ----

 the one ->permission value can not reflect both: FILE, DIR. therefore that
 value should become obsolete in favor of the contants -or- the class
 itself relfects both settings: file and dir (->permission_file,
 ->permission_dir or by array.).

 technically it is not needed, because those can be replaced by constants.
 this would be easier as well. practically it makes sense not to do so
 because otherwise the class would be directly connected with global
 contants which does not help to keep things apart from each ohter.

 I added some more docblocks from the top of the file but could not finish.
 Next function is group() to contiue with. Maybe DD32?

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/10170#comment:12>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list