File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -96,9 +96,16 @@ let open_files ?(user = Ocsigen_config.get_user ()) ?(group = Ocsigen_config.get
9696 (Unix. getpwnam user).Unix. pw_uid
9797 with Not_found as e -> ignore (Lwt_log. error " Error: Wrong user" ); raise e)
9898 in
99- Lwt_unix. chown (full_path access_file) uid gid >> = fun () ->
100- Lwt_unix. chown (full_path warning_file) uid gid >> = fun () ->
101- Lwt_unix. chown (full_path error_file) uid gid
99+ Lwt. catch
100+ (fun () ->
101+ Lwt_unix. chown (full_path access_file) uid gid >> = fun () ->
102+ Lwt_unix. chown (full_path warning_file) uid gid >> = fun () ->
103+ Lwt_unix. chown (full_path error_file) uid gid)
104+ (fun e -> match e with
105+ | Unix. Unix_error (Unix. EPERM, _ , _ ) ->
106+ (* to allow for symlinks to /dev/null *)
107+ Lwt. return_unit
108+ | _ -> Lwt. fail e)
102109
103110(* ***)
104111
You can’t perform that action at this time.
0 commit comments