Formula chrony permission problem after re-installing homebrew (or applying manual changes) #193752
Open
4 tasks done
Labels
bug
Reproducible Homebrew/homebrew-core bug
brew gist-logs <formula>
link ORbrew config
ANDbrew doctor
outputVerification
brew doctor
output saysYour system is ready to brew.
and am still able to reproduce my issue.brew update
and am still able to reproduce my issue.brew doctor
and that did not fix my problem.What were you trying to do (and why)?
After again running the installation script with
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
as shown on the Homebrew website https://brew.sh, I was trying use the commandsudo /opt/homebrew/bin/chronyc selectdata
in order to view the appropriate data. (sudo /opt/homebrew/bin/chronyc tracking
andsudo /opt/homebrew/bin/chronyc sources
work.)A problem analysis and a solution is provided below.
What happened (include all command output)?
Client:
Daemon (restarted manually with debugging output:
launchctl kill 9 system/org.tuxfamily.chrony; /opt/homebrew/sbin/chronyd -d -d
)or
What did you expect to happen?
The requested data to be shown.
Step-by-step reproduction instructions (by running
brew
commands)/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install chrony
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
sudo /opt/homebrew/bin/chronyc selectdata
Analysis:
The
selectdata
option requires a working socket connection.The directory in which the socket file resides MUST have correct, ownership (root), group, and permissions (o-rwx), see: https://gitlab.com/chrony/chrony/-/blob/master/conf.c#L1836
Ownership is corrupted by the installation script command
/usr/bin/sudo /usr/sbin/chown -R user:admin /opt/homebrew
.Permissions may be corrupted by manually fixing permissions recursively over /opt/homebrew which sometimes is necessary to fix permission problems.
Solution:
brew install chrony
orbrew reinstall chrony
./var/run/chrony
(instead of/opt/homebrew/var/run/chrony
) by addingbindcmdaddress /var/run/chrony/chronyd.sock
to/etc/chrony.conf
, so ownership, group, and permissions are not modified by re-installing Homebrew or modifying permissions in the Homebrew directory. Then chronyc must be run with option-h /var/run/chrony/chronyd.sock,127.0.0.1,::1
.chronyd
, but also for the clientchronyc
the debugging flag should be enabled. Currentlychronyc -d
doesn't seem to produce any debug output.Originally reported at: https://gitlab.com/chrony/chrony/-/issues/16
The text was updated successfully, but these errors were encountered: