Bug #32261
mkdir_deep does not set correct permissions nor create group
| Status: | Resolved | Start date: | 2011-12-02 | |
|---|---|---|---|---|
| Priority: | Must have | Due date: | ||
| Assignee: | - | % Done: | 100% |
|
| Category: | - | |||
| Target version: | 4.7.0-beta2 | |||
| TYPO3 Version: | 4.7 | Complexity: | ||
| PHP Version: | ||||
| Votes: | 0 |
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
| related to Core - Bug #31987: Could not mkdir_deep with configured "folderCreateMask" d... | Closed | 2011-11-22 | ||
| related to Extension Builder - Bug #29369: Wrong permissions on directories created by extension bui... | Closed | 2011-08-30 | ||
| related to Core - Bug #26240: Use recursive option of mkdir in t3lib_div::mkdir_deep | Closed | 2011-04-24 |
Associated revisions
[BUGFIX] Fix permissions and create group in mkdir_deep
t3lib_div::mkdir_deep does not properly create nested directories.
This is fixed by using API method t3lib_div::fixPermissions on the
first created directory with recursive flag set.
Change-Id: I951028195047a5777f2c305d8d5bdf780a102fb8
Fixes: #32261
Releases: 4.7, 4.6
Reviewed-on: http://review.typo3.org/7022
Reviewed-by: Loek Hilgersom
Tested-by: Loek Hilgersom
Reviewed-by: Susanne Moog
Tested-by: Susanne Moog
Reviewed-by: Tolleiv Nietsch
Tested-by: Tolleiv Nietsch
[BUGFIX] Fix permissions and create group in mkdir_deep
t3lib_div::mkdir_deep does not properly create nested directories.
This is fixed by using API method t3lib_div::fixPermissions on the
first created directory with recursive flag set.
Change-Id: I5f250b25663b64b770c2308eccbc3da17a12c8ae
Fixes: #32261
Releases: 4.7, 4.6
Reviewed-on: http://review.typo3.org/8637
Reviewed-by: Ernesto Baschny
Reviewed-by: Loek Hilgersom
Tested-by: Loek Hilgersom
Reviewed-by: Susanne Moog
Tested-by: Susanne Moog
History
Updated by Gerrit Code Review over 1 year ago
- Status changed from New to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/7022
Updated by Gerrit Code Review over 1 year ago
Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/7022
Updated by Gerrit Code Review over 1 year ago
Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/7022
Updated by Gerrit Code Review over 1 year ago
Patch set 4 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/7022
Updated by Gerrit Code Review over 1 year ago
Patch set 5 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/7022
Updated by Gerrit Code Review over 1 year ago
Patch set 6 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/7022
Updated by Gerrit Code Review over 1 year ago
Patch set 7 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/7022
Updated by Gerrit Code Review over 1 year ago
Patch set 8 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/7022
Updated by Gerrit Code Review over 1 year ago
Patch set 9 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/7022
Updated by Gerrit Code Review over 1 year ago
Patch set 10 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/7022
Updated by Gerrit Code Review over 1 year ago
Patch set 11 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/7022
Updated by Gerrit Code Review over 1 year ago
Patch set 1 for branch TYPO3_4-6 has been pushed to the review server.
It is available at http://review.typo3.org/8637
Updated by Loek Hilgersom over 1 year ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 9da8fd3a3f7d4898134719c13ff3059a23436935.
Updated by Gerrit Code Review about 1 year ago
- Status changed from Resolved to Under Review
Patch set 1 for branch TYPO3_4-5 has been pushed to the review server.
It is available at http://review.typo3.org/9171
Updated by Steffen Ritter about 1 year ago
- Target version set to 4.7.0-beta2
Updated by Jigal van Hemert about 1 year ago
Todo: abandon patch for 4.5 and mark this issue as resolved.
Updated by Christian Kuhn 10 months ago
- Status changed from Under Review to Resolved