[wp-testers] Problem with automatic upgrade
DD32
wordpress at dd32.id.au
Tue Dec 2 00:27:11 GMT 2008
On Sun, 30 Nov 2008 22:37:56 +1100, Stefano Aglietti <steagl4ml at gmail.com>
wrote:
> On Sun, 30 Nov 2008 11:27:17 +0000, Peter Westwood
> <peter.westwood at ftwr.co.uk> wrote:
>
>> I guess we could try reading the chmod from wp-config.php and applying
>> that to all files?
>
> And for dirs?
>
>> Otherwise override in wp-config with a constant - WP_DEFAULT_CHMOD
>
> I suppose this was already solved in dir creation for uploading files,
> 2 years ago we had same problem with suexc and new dir creatin during
> file upload and Ryan solved it.
>
> A costa nnt for wp-config would be a good alternative, i would
> prefere a trasparent solution but if there is no way better this.
> Instead that having a constant to specify chmod mask would be better
> a on/off switch, with suexec there is no chmod in other case there
> is... your choise to decide what it is the defaul value if not
> declared.
Basing it off wp-config.php would be a bad idea, since many people chmod
777 that thing (for no good reason), Basing the chmod off the current
wp-settings & wp-includes might be an idea..
Eg, A combination:
if ( !defined('FS_CHMOD_FILES') )
define('FS_CHMOD_FILES', $wp_filesystem->getchmod('wp-settings.php'));
if ( !defined('FS_CHMOD_DIRS') )
define('FS_CHMOD_DIRS', $wp_filesystem->getchmod('wp-includes'));
(Note: thats not 100% right code, it'll need some extra paths and whatnot)
Sound like that would be a good approach? If so, i'll whip up a patch
later.
More information about the wp-testers
mailing list