vty/command: Use CONFIGFILE_MASK as mask in chmod and not as mode.
diff --git a/openbsc/src/vty/command.c b/openbsc/src/vty/command.c
index c32e703..6372fb1 100644
--- a/openbsc/src/vty/command.c
+++ b/openbsc/src/vty/command.c
@@ -2541,7 +2541,7 @@
 	talloc_free(config_file_sav);
 	talloc_free(config_file_tmp);
 
-	if (chmod(config_file, CONFIGFILE_MASK) != 0) {
+	if (chmod(config_file, 0666 & ~CONFIGFILE_MASK) != 0) {
 		vty_out(vty, "Can't chmod configuration file %s: %s (%d).%s",
 			config_file, strerror(errno), errno, VTY_NEWLINE);
 		return CMD_WARNING;