[wp-trac] Re: [WordPress Trac] #8794: Allow Automatical upgrade to use direct method when files are group writable

WordPress Trac wp-trac at lists.automattic.com
Mon Jan 5 04:36:43 GMT 2009


#8794: Allow Automatical upgrade to use direct method when files are group
writable
-------------------------------------+--------------------------------------
 Reporter:  vilhelmk                 |        Owner:     
     Type:  enhancement              |       Status:  new
 Priority:  normal                   |    Milestone:  2.8
Component:  Upgrade                  |      Version:  2.8
 Severity:  normal                   |   Resolution:     
 Keywords:  has-patch needs-testing  |  
-------------------------------------+--------------------------------------
Comment (by vilhelmk):

 I had to do some more testing and reading up on the subject since my mind
 isn't wrapped around this either (and it is a while since I looked into
 this, and fixed it manually - but the changes was lost in version 2.7,
 obviously).

 So, to correct myself (sorry about any misinformation in my previous
 comment):

 The g+s only ensures that the GID of the new files is inherited by the
 parent catalogue, meaning that the g+w does *not* get inherited. To solve
 this have {{{umask 002}}} in apache's envvars (/etc/apache2/envvars on
 debian/ubuntu), and by doing this all files created by apache gets the g+w
 flag (+s won't solve this alone).

 So, if the web-server is using umask 002 and does not setgid to the
 correct group the user won't have access to the files by ftp/cli.

 I assume that having umask 002 in apache's envvars is a pretty rare
 setting, and that people probably knows what they are doing when using it.
 The default is usually umask 022 (meaning that files only get u+w).

 So yes, if the user of the files changes and the user isn't in the correct
 group it will break, if the web-server is using umask 002.

 Hope this clarifies more.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/8794#comment:4>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list