Cache is not created with mode 0777

Notice: This thread is very old.
Taco
Member | 39
+
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);
}
David Grudl
Nette Core | 8105
+
0
-

Add umask(0) in your bootstrap.php

Taco
Member | 39
+
0
-

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

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

David Grudl
Nette Core | 8105
+
0
-

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