<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div style="margin: 0;">hi <span style="font-family: arial; white-space: pre-wrap;">Lennart,</span></div><div style="margin: 0;"><span style="font-family: arial; white-space: pre-wrap;"><br></span></div><div style="margin: 0;"><font face="arial"><span style="white-space: pre-wrap;">I mean the DBUS property. </span></font></div><p style="margin: 0;"><i>root@demoboard:/# busctl set-property org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus Features as 1 x</i></p><p style="margin: 0;"><i><b>Cannot set read-only property</b>         -- the default</i></p><p style="margin: 0;"><br></p><p style="margin: 0;"><i>root@demoboard:/# busctl set-property com.sugon.sensors.DISCRETE /com/sugon/sensors/HDD/HDD4_Status xyz.openbmc_project.Sensor.DiscreteAll FanDeviceInserted b true              -- new add</i></p><p style="margin: 0;"><i>root@demoboard:/#</i></p><div><br></div><div style="margin: 0;">I want the property on Dbus is read only. Just can modify by the special method and cannot  modify the property directly. How can I change it like this?</div><div style="margin: 0;"><br></div><div style="margin: 0;">thanks,</div><div style="margin: 0;">Byron</div><div style="position:relative;zoom:1"></div><div id="divNeteaseMailCard"></div><p style="margin: 0;"><br></p><pre><br>At 2020-04-21 00:43:00, "Lennart Poettering" <lennart@poettering.net> wrote:
>On Mo, 20.04.20 23:00, www (ouyangxuan10@163.com) wrote:
>
>> dear all;
>>
>>
>> How to set some properties in systemd to read-only£¿ Who can give the sample code?
>
>I don't understand the question. Do you mean a D-Bus property? They
>generally are read-only for unprivileged bus clients. With a PolicyKit
>action configuration you can open them up, but typically unprivileged
>clients can't change them.
>
>Lennart
>
>--
>Lennart Poettering, Berlin
</pre></div><br><br><span title="neteasefooter"><p> </p></span>