Project

General

Profile

Actions

Bug #78319

closed

Testbase: Folder creation with 0777 permissions.

Added by Mario Lubenka about 8 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
System/Bootstrap/Configuration
Target version:
-
Start date:
2016-10-17
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
8
PHP Version:
7.0
Tags:
Complexity:
no-brainer
Is Regression:
No
Sprint Focus:

Description

Problem

During the creation of the test environment for the Acceptance Tests via Codeception, \TYPO3\CMS\Core\Tests\Testbase->createDirectory($directory) creates folders with 0777 permission. However because of the umask value it is not possible to set permissions of the newly created folder to 0777.
As of right now only the owner of the folder is able to write (at least on my local Ubuntu 18.04 machine).

Fix

It is possible to set the umask value temporarily to 0, that makes it possible to set 0777:

$oldmask = umask(0);
mkdir("test", 0777);
umask($oldmask);

See: http://stackoverflow.com/questions/3997641/why-cant-php-create-a-directory-with-777-permissions

Actions #1

Updated by Anja Leichsenring about 8 years ago

for what reason would you want to create directories inside the TYPO3 instance accessible to everyone? What is your usecase?

Actions #2

Updated by Frank Nägler about 8 years ago

where and when the core creates folder with kind of permissions?
I think we have a lot of places, where folder are created, so a bit more context could help us to understand your problem.

Actions #3

Updated by Frank Nägler about 8 years ago

  • Status changed from New to Needs Feedback
Actions #4

Updated by Mario Lubenka about 8 years ago

Frank Naegler wrote:

where and when the core creates folder with kind of permissions?
I think we have a lot of places, where folder are created, so a bit more context could help us to understand your problem.

Oh, sorry. I'm talking about the test environment that is created during the Acceptance Tests via Codeception.
\TYPO3\CMS\Core\Tests\Testbase->createDirectory($directory) creates folders with 0777 permission, which (in my case) it can't because of the umask value.

Actions #5

Updated by Mario Lubenka about 8 years ago

  • Assignee set to Frank Nägler
Actions #6

Updated by Wouter Wolters about 8 years ago

  • Assignee deleted (Frank Nägler)

Please do not assign tickets yourself. Thanks.

Actions #7

Updated by Mario Lubenka about 8 years ago

  • Subject changed from Testbase: Unable to create directories via mkdir with chmod 0777 to Testbase: Folder creation with 0777 permissions.
  • Description updated (diff)
Actions #8

Updated by Alexander Opitz over 7 years ago

Still the Question from Anja is open:

for what reason would you want to create directories inside the TYPO3 instance accessible to everyone? What is your usecase?
Actions #9

Updated by Alexander Opitz about 7 years ago

  • Status changed from Needs Feedback to Closed

No feedback within the last 90 days => closing this issue.

If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.

Actions

Also available in: Atom PDF