Skip to content

Commit

Permalink
launchd: fix permissions on the plist file
Browse files Browse the repository at this point in the history
Don't rely on the user have the same umask as me, force the permissions
to be correct.

I'm guessing that the ownership is something that gets fixed on reboot,
which would explain why things start working for folks that reboot.

Refs #90
  • Loading branch information
wez committed Mar 29, 2015
1 parent ab7be81 commit ed148a4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,8 @@ static void spawn_via_launchd(void)
"</plist>\n",
watchman_path, log_name, sock_name, watchman_state_file, sock_name);
fclose(fp);
// Don't rely on umask, ensure we have the correct perms
chmod(watchman_path, 0644);

append_argv(argv, plist_path);

Expand Down

0 comments on commit ed148a4

Please sign in to comment.