(stat.Unix.st_perm land 0o001 > 0)
with Unix.Unix_error _ -> false
+let chmod mode filename =
+ Unix.chmod filename mode
+
let mkdir path =
let components = split ~sep:'/' path in
let rec aux where = function
let path =
if where = "" then piece else where ^ "/" ^ piece in
(try
- Unix.mkdir path 0o775
+ Unix.mkdir path 0o755; chmod 0o2775 path
with
| Unix.Unix_error (Unix.EEXIST,_,_) -> ()
| Unix.Unix_error (e,_,_) ->
raise
(Failure
- ("Unix.mkdir " ^ path ^ " 0o775 :" ^ (Unix.error_message e))));
+ ("Unix.mkdir " ^ path ^ " 0o2775 :" ^ (Unix.error_message e))));
aux path tl
in
let where = if path.[0] = '/' then "/" else "" in
aux where components
-let chmod mode filename =
- Unix.chmod filename mode
-
(** {2 Filesystem} *)
let input_file fname =