Re: chronyc serverstats => 501 not autorized

Gerd Hoerst <[email protected]> Thu, 20 Nov 2025 09:10:38 +0100 (GMT+01:00)
Newsgroups gmane.comp.time.chrony.user
Message-ID <[email protected]>
------=_Part_3_215015728.1763626238208
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Hi !

I compiled it on 24.04 with options from 4.7

Ciao Gerd

20.11.2025 08:28:47 Miroslav Lichvar <[email protected]>:

> On Wed, Nov 19, 2025 at 05:21:55PM +0100, Gerd Hoerst wrote:
>> Hi !
>>=20
>> So here again.... for 4.7 i made 2 traces because the option -u is not
>> available there.
>>=20
>> Both on same machine with same system (ubuntu 24.04)
>=20
> Ok, so with 4.7 there is:
>=20
>> bind(3, {sa_family=3DAF_UNIX, sun_path=3D"/run/chrony/chronyc.89798.sock=
"}, 33) =3D 0
>> connect(3, {sa_family=3DAF_UNIX, sun_path=3D"/run/chrony/chronyd.sock"},=
 27) =3D 0
>=20
> but with 4.8 it is:
>=20
>> geteuid()=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D 0
>> bind(5, {sa_family=3DAF_UNIX, sun_path=3D"/run/chrony/chronyc.89002/pyyq=
vBK3cIONiIxh/sock"}, 50) =3D 0
>> connect(5, {sa_family=3DAF_UNIX, sun_path=3D"/run/chrony/chronyd.sock"},=
 27) =3D -1 EACCES (Keine Berechtigung)
>=20
> For some reason, the same connect() call is failing with 4.8.
> geteuid() returning 0 confirms it's running as root. The difference in
> the bind() call is expected, that's was one of the changes made in
> 4.8, but I'm not sure how could that impact the connect() call.
>=20
> I still suspect an AppArmor issue. Where did you get the 4.8 package?
> On https://launchpad.net/ubuntu/+source/chrony I see the latest
> version that Ubuntu has is 4.7.
>=20
> --=20
> Miroslav Lichvar

------=_Part_3_215015728.1763626238208
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 7bit

<html>
 <head>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
 </head>
 <body>
  <span dir="ltr" style="margin-top:0; margin-bottom:0;">Hi !</span>
  <br>
  <br><span dir="ltr" style="margin-top:0; margin-bottom:0;">I compiled it on 24.04 with options from 4.7</span>
  <br>
  <br><span dir="ltr" style="margin-top:0; margin-bottom:0;">Ciao Gerd</span>
  <br>
  <div class="fairemail_quote">
   <div dir="ltr">
    <p>20.11.2025 08:28:47 Miroslav Lichvar &lt;[email protected]&gt;:</p>
   </div>
   <blockquote style="margin:0;border-left:3px solid #ccc; padding-left:10px;">
    <div>
     On Wed, Nov 19, 2025 at 05:21:55PM +0100, Gerd Hoerst wrote: 
     <br>
     <blockquote style="margin:0;border-left:3px solid #ccc; padding-left:10px;">
      Hi ! 
      <br>
      <br>
       So here again.... for 4.7 i made 2 traces because the option -u is not 
      <br>
       available there. 
      <br>
      <br>
       Both on same machine with same system (ubuntu 24.04) 
      <br>
     </blockquote>
     <br>
      Ok, so with 4.7 there is: 
     <br>
     <br>
     <blockquote style="margin:0;border-left:3px solid #ccc; padding-left:10px;">
      bind(3, {sa_family=AF_UNIX, sun_path="/run/chrony/chronyc.89798.sock"}, 33) = 0 
      <br>
       connect(3, {sa_family=AF_UNIX, sun_path="/run/chrony/chronyd.sock"}, 27) = 0 
      <br>
     </blockquote>
     <br>
      but with 4.8 it is: 
     <br>
     <br>
     <blockquote style="margin:0;border-left:3px solid #ccc; padding-left:10px;">
      geteuid()&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = 0 
      <br>
       bind(5, {sa_family=AF_UNIX, sun_path="/run/chrony/chronyc.89002/pyyqvBK3cIONiIxh/sock"}, 50) = 0 
      <br>
       connect(5, {sa_family=AF_UNIX, sun_path="/run/chrony/chronyd.sock"}, 27) = -1 EACCES (Keine Berechtigung) 
      <br>
     </blockquote>
     <br>
      For some reason, the same connect() call is failing with 4.8. 
     <br>
      geteuid() returning 0 confirms it's running as root. The difference in 
     <br>
      the bind() call is expected, that's was one of the changes made in 
     <br>
      4.8, but I'm not sure how could that impact the connect() call. 
     <br>
     <br>
      I still suspect an AppArmor issue. Where did you get the 4.8 package? 
     <br>
      On https://launchpad.net/ubuntu/+source/chrony I see the latest 
     <br>
      version that Ubuntu has is 4.7. 
     <br>
     <br>
      -- 
     <br>
      Miroslav Lichvar 
     <br>
    </div>
   </blockquote>
  </div>
 </body>
</html>
------=_Part_3_215015728.1763626238208--

-- 
To unsubscribe email chrony-users-request-kWFZVVI9zxvPqho9SqqRMmD2FQJk+8+b@public.gmane.org 
with "unsubscribe" in the subject.
For help email chrony-users-request-kWFZVVI9zxvPqho9SqqRMmD2FQJk+8+b@public.gmane.org 
with "help" in the subject.
Trouble?  Email [email protected]