Re: [chrony-dev] Wrong owner/group of /var/run/chrony |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-dev Archives
]
On Thu, Aug 13, 2015 at 07:55:24AM +1200, Bryan Christianson wrote:
> I'm getting the following at chronyd startup
>
> 2015-08-12T19:48:04Z Wrong owner/group of /var/run/chrony
> 2015-08-12T19:48:04Z Disabled command socket /var/run/chrony/chronyd.sock
>
> /var/run/chrony does not exist and is being created by chronyd
>
> On MacOS, /var/run (existing system directory) has permissions:
> sh-3.2# ls -ld /var/run
> drwxrwxr-x 34 root daemon 1156 13 Aug 07:34 /var/run
>
> and from the mkdir (2) man page
> DESCRIPTION
> The directory's owner ID is set to the process's effective user ID. The
> directory's group ID is set to that of the parent directory in which it
> is created.
Oh, this is the BSD file system semantics. On Linux the gid is set by
the parent directory only when it has the setgid bit.
> Maybe the call to chown() should just be unconditional
Yeah, that is probably the best fix. chown() apparently doesn't change
the uid/gid if -1 is specified, so the caller could use that. Using
zero for that purpose was a bad idea.
I'll fix it. Thanks!
--
Miroslav Lichvar
--
To unsubscribe email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject.
For help email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble? Email listmaster@xxxxxxxxxxxxxxxxxxxx.