Cache is not created with mode 0777

Notice: This thread is very old.

6 years ago

Taco
Member | 38
+
0
-

Cache is not created with mode 0777. Then it's impossible to delete it.

Code:
Nette/Configurator.php:258

is:

if (!is_dir($dir)) {
	mkdir($dir, 0777);
}

It probably should be right:

if (!is_dir($dir)) {
	$old = umask(0);
	mkdir($dir, 0777);
	umask($old);
}

6 years ago

David Grudl
Nette Core | 7068
+
0
-

Add umask(0) in your bootstrap.php

6 years ago

Taco
Member | 38
+
0
-

I guess the reason. Can you put it, please?

Last edited by Taco (2013-12-27 01:52)

6 years ago

David Grudl
Nette Core | 7068
+
0
-

Some discussion is here https://github.com/…/issues/1039