diff --git a/tests/topotests/lib/topotest.py b/tests/topotests/lib/topotest.py index c220bcfed1b8..425f562cee3b 100644 --- a/tests/topotests/lib/topotest.py +++ b/tests/topotests/lib/topotest.py @@ -1477,7 +1477,7 @@ def config_host(self, **params): self.routertype = params.get("routertype") # Set ownership of config files - self.cmd("chown {0}:{0}vty /etc/{0}".format(self.routertype)) + self.cmd("chown root:root /etc/{0}".format(self.routertype)) def terminate(self): # Stop running FRR daemons @@ -1639,7 +1639,7 @@ def loadConf(self, daemon, source=None, param=None): self.cmd_raises("rm -f " + conf_file) self.cmd_raises("touch " + conf_file) self.cmd_raises( - "chown {0}:{0} {1}".format(self.routertype, conf_file) + "chown root:root {0}".format(conf_file) ) self.cmd_raises("chmod 664 {}".format(conf_file)) elif source: @@ -1654,7 +1654,7 @@ def loadConf(self, daemon, source=None, param=None): ) self.cmd_raises("cp {} {}".format(source, conf_file_mgmt)) self.cmd_raises( - "chown {0}:{0} {1}".format(self.routertype, conf_file_mgmt) + "chown root:root {0}".format(conf_file_mgmt) ) self.cmd_raises("chmod 664 {}".format(conf_file_mgmt)) @@ -1662,7 +1662,7 @@ def loadConf(self, daemon, source=None, param=None): "copying '%s' as '%s' on '%s'", source, conf_file, self.name ) self.cmd_raises("cp {} {}".format(source, conf_file)) - self.cmd_raises("chown {0}:{0} {1}".format(self.routertype, conf_file)) + self.cmd_raises("chown root:root {0}".format(conf_file)) self.cmd_raises("chmod 664 {}".format(conf_file)) if (daemon == "snmpd") and (self.routertype == "frr"): @@ -1708,8 +1708,8 @@ def startRouter(self, tgen=None): ) self.cmd( - "chown %s:%svty /etc/%s/vtysh.conf" - % (self.routertype, self.routertype, self.routertype) + "chown root:root /etc/%s/vtysh.conf" + % (self.routertype) ) # TODO remove the following lines after all tests are migrated to Topogen. # Try to find relevant old logfiles in /tmp and delete them @@ -1817,7 +1817,7 @@ def startRouterDaemons(self, daemons=None, tgen=None): # Starts actual daemons without init (ie restart) # cd to per node directory - self.cmd("install -m 775 -o frr -g frr -d {}/{}".format(self.logdir, self.name)) + self.cmd("install -m 775 -o root -g root -d {}/{}".format(self.logdir, self.name)) self.set_cwd("{}/{}".format(self.logdir, self.name)) self.cmd("umask 000") @@ -2045,7 +2045,7 @@ def start_daemon(daemon, extra_opts=None): ) # Update the permissions on the log files - self.cmd("chown frr:frr -R {}/{}".format(self.logdir, self.name)) + self.cmd("chown root:root -R {}/{}".format(self.logdir, self.name)) self.cmd("chmod ug+rwX,o+r -R {}/{}".format(self.logdir, self.name)) if "frr" in logd_options: