Project

General

Profile

Actions

Bug #32261

closed

mkdir_deep does not set correct permissions nor create group

Added by Loek Hilgersom almost 13 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
-
Target version:
Start date:
2011-12-02
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
4.7
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

t3lib_div::mkdir_deep does not use the provided fixPermissions function and fails to set proper permissions and ownership.
Problems occur with typo3temp/Cache (see also issue 31987) and with Extension Builder (issue 29369), but possibly at other places too.

mkdir_deep uses the recursive option to create multiple, nested directories with one php mkdir command, but is based on 2 wrong assumptions:
1. if you set permissions using mkdir('path/newdir/newsubdir', 0775, TRUE); then only newsubdir gets chmodded, not newdir
2. setting permissions using mkdir is limited by the users umask (which can set to umask(0) by php but that also has drawbacks)

Additionally, mkdir_deep does not set group ownership following $TYPO3_CONF_VARS['BE']['createGroup']

The supplied patch should (IMO) make use of the already existing methods t3lib_div::mkdir and fixPermissions


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #31987: Could not mkdir_deep with configured "folderCreateMask" depending on umaskClosed2011-11-22

Actions
Related to TYPO3 Core - Bug #26240: Use recursive option of mkdir in t3lib_div::mkdir_deepClosedChristian Kuhn2011-04-24

Actions
Actions

Also available in: Atom PDF