From 936852a005473293ff2cfba47d062162cf6e18ba Mon Sep 17 00:00:00 2001 From: Nick Gavalas Date: Fri, 13 Oct 2017 01:46:26 -0700 Subject: [PATCH] make mkdir_p spit out world-readable directories Summary: This is super strange. `mkdir_p` uses 0770 and `mkdir_no_fail` uses 0777 for the directory permissions. It appears that D3691691 incorrectly created `mkdir_p`; before that diff, they would have been 0770. This impacts `flow` compiler: the recursive artifact output is not world-readable, so stuff written by the compiler is not readable by the webserver user. Reviewed By: alexchow Differential Revision: D6044487 fbshipit-source-id: b6ba1c096c53adc43b51cdd45e91063ee5f9ea93 --- hphp/hack/src/utils/disk/realDisk.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hphp/hack/src/utils/disk/realDisk.ml b/hphp/hack/src/utils/disk/realDisk.ml index 1267c73c583..84372b4f04a 100644 --- a/hphp/hack/src/utils/disk/realDisk.ml +++ b/hphp/hack/src/utils/disk/realDisk.ml @@ -24,7 +24,7 @@ let rec mkdir_p = function | "" -> failwith "Unexpected empty directory, should never happen" | d when not (Sys.file_exists d) -> mkdir_p (Filename.dirname d); - Unix.mkdir d 0o770; + Unix.mkdir d 0o777; | d when Sys.is_directory d -> () | d -> raise (NotADirectory d) -- 2.11.4.GIT