[wp-trac] [WordPress Trac] #18313: FS_CHMOD_DIR not functioning correctly with setgid
WordPress Trac
wp-trac at lists.automattic.com
Tue Aug 2 02:29:03 UTC 2011
#18313: FS_CHMOD_DIR not functioning correctly with setgid
-------------------------------+------------------------------
Reporter: jrmuir | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Filesystem | Version: 3.1.2
Severity: major | Resolution:
Keywords: reporter-feedback |
-------------------------------+------------------------------
Changes (by dd32):
* keywords: => reporter-feedback
Comment:
> With the FS_CHMOD_DIR value of 2770 should, unless I'm completely
mistaken about what the functionality was meant to provide, it should set
the exact permissions the same as a chmod call would, of 2770
You're not mistaken with the use of the constant, however you are defining
it wrong.
Chmod values are specified in an Octal format, in PHP to define an octal
number, you need to prefix it with 0, Eg:
{{{
var_dump( array( 2770, 02770 ) );
// output converts to Base10:
array
0 => int 2770
1 => int 1528
}}}
As you can see, prefixed with 2 it comes out as the Base10 version, which
is going to cause problems in chmod values, in octal it comes to
(decimal)1528.
Can you just check to see if i'm on the right track there?
--
Ticket URL: <http://core.trac.wordpress.org/ticket/18313#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list