When someone creates or changes permission of the var/log
directory it stays that way. This can cause issues for logrotate
as it needs to have correct permission on directory.

Attempt to fix the permission every time we run start_ovn_daemon.

Reported-at: https://bugzilla.redhat.com/2113855
Signed-off-by: Ales Musil <[email protected]>
---
 utilities/ovn-lib.in | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/utilities/ovn-lib.in b/utilities/ovn-lib.in
index 301cc5712..1e48ef28c 100644
--- a/utilities/ovn-lib.in
+++ b/utilities/ovn-lib.in
@@ -133,6 +133,9 @@ start_ovn_daemon () {
     set "$@" --detach
     test X"$MONITOR" = Xno || set "$@" --monitor
 
+    chown -R $INSTALL_USER:$INSTALL_GROUP $ovn_logdir
+    chown -R $INSTALL_USER:$INSTALL_GROUP $ovn_rundir
+
     start_wrapped_daemon "$wrapper" $daemon "$priority" "$@"
 }
 
-- 
2.35.3

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to