The CKfinder does not seem to reset the umask before using the ChmodFiles and ChmodFolders settings.
I found I had to add:
umask (0000);
$config['ChmodFiles'] = 0770 ;
to enable the permissions to be set to 0770.
I suggest there be a proper umask setting, defaulting to 0000 so that the Chmod.. settings do what is expected explicitly.
Alternatively, I think the code:
$oldUmask = umask();
$bCreated = @mkdir($dir, $perms, true);
umask($oldUmask);
is wrong. http://www.php.net/umask says:
"umask() without arguments simply returns the current umask otherwise the old umask is returned. "
I think what is wanted is actually
$oldUmask = umask(0);
rather than
$oldUmask = umask();
or better to chmod() the file afterwards, as recommended on the same page.
Mon, 03/17/2008 - 21:37
#1
Re: BUG: umask issue
Thanks again!
Wiktor Walc
CTO, CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+