Merge ~cgrabowski/maas:fix_config_permissions_on_init into maas:master

Proposed by Christian Grabowski
Status: Merged
Approved by: Christian Grabowski
Approved revision: d3a44f73c95a986e5bb44b01fe2c73dccf0f66c1
Merge reported by: MAAS Lander
Merged at revision: not available
Proposed branch: ~cgrabowski/maas:fix_config_permissions_on_init
Merge into: maas:master
Diff against target: 47 lines (+7/-0)
3 files modified
debian/maas-common.postinst (+5/-0)
debian/maas-rack-controller.postinst (+1/-0)
debian/maas-region-api.postinst (+1/-0)
Reviewer Review Type Date Requested Status
MAAS Lander Approve
Adam Collard (community) Approve
Review via email: mp+434600@code.launchpad.net

Commit message

change ownership of /etc/maas to maas:maas

To post a comment you must log in.
Revision history for this message
Diego Mascialino (dmascialino) wrote (last edit ):

just asking you:

did you check these other changes to permissions of /etc/maas* ?

$ git grep "chown.*etc/maas"

debian/maas-common.postinst: chown -R maas:maas /etc/maas/certificates
utilities/remote-reinstall:ssh_run "chown -R maas:maas /etc/maas"

Revision history for this message
MAAS Lander (maas-lander) wrote :

UNIT TESTS
-b fix_config_permissions_on_init lp:~cgrabowski/maas/+git/maas into -b master lp:~maas-committers/maas

STATUS: SUCCESS
COMMIT: e83caa8b40ad83f73a95049f4cf684b5f80a515b

review: Approve
Revision history for this message
Christian Grabowski (cgrabowski) wrote :

> just asking you:
>
> did you check these other changes to permissions of /etc/maas* ?
>
>
> $ git grep "chown.*etc/maas"
>
> debian/maas-common.postinst: chown -R maas:maas /etc/maas/certificates
> utilities/remote-reinstall:ssh_run "chown -R maas:maas /etc/maas"

Yeah I noticed those, and regiond.conf and rackd.conf have root:maas as well, thinking about it, we may want maas:maas instead.

Revision history for this message
Adam Collard (adam-collard) wrote :

maas:maas is what it was back in 3.1 - unclear what has caused that to change

Revision history for this message
Adam Collard (adam-collard) :
review: Approve
Revision history for this message
MAAS Lander (maas-lander) wrote :

UNIT TESTS
-b fix_config_permissions_on_init lp:~cgrabowski/maas/+git/maas into -b master lp:~maas-committers/maas

STATUS: SUCCESS
COMMIT: 0959816712cf85e7897111d9ee3c8faa365dd752

review: Approve
Revision history for this message
MAAS Lander (maas-lander) wrote :

UNIT TESTS
-b fix_config_permissions_on_init lp:~cgrabowski/maas/+git/maas into -b master lp:~maas-committers/maas

STATUS: SUCCESS
COMMIT: 67fc2f60d3be45b5b4eafa633dd4331f81f153ea

review: Approve
Revision history for this message
MAAS Lander (maas-lander) wrote :

UNIT TESTS
-b fix_config_permissions_on_init lp:~cgrabowski/maas/+git/maas into -b master lp:~maas-committers/maas

STATUS: SUCCESS
COMMIT: d3a44f73c95a986e5bb44b01fe2c73dccf0f66c1

review: Approve
Revision history for this message
MAAS Lander (maas-lander) wrote :

LANDING
-b fix_config_permissions_on_init lp:~cgrabowski/maas/+git/maas into -b master lp:~maas-committers/maas

STATUS: FAILED BUILD
LOG: http://maas-ci.internal:8080/job/maas-tester/1634/consoleText

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/maas-common.postinst b/debian/maas-common.postinst
2index 67e9787..e01b158 100755
3--- a/debian/maas-common.postinst
4+++ b/debian/maas-common.postinst
5@@ -17,6 +17,10 @@ configure_logging() {
6 chown maas:maas /var/log/maas/maas.log
7 }
8
9+configure_conf_dir() {
10+ chown maas:maas /etc/maas
11+}
12+
13 configure_lib_dir() {
14 # Ensure lib dir has correct permissions
15 chown maas:maas /var/lib/maas/
16@@ -42,6 +46,7 @@ add_user_group(){
17 disable_nginx
18 add_user_group
19 configure_logging
20+configure_conf_dir
21 configure_lib_dir
22
23 #DEBHELPER#
24diff --git a/debian/maas-rack-controller.postinst b/debian/maas-rack-controller.postinst
25index cbd92cd..531ae3b 100755
26--- a/debian/maas-rack-controller.postinst
27+++ b/debian/maas-rack-controller.postinst
28@@ -145,6 +145,7 @@ fix_dns_permissions() {
29 # Unconditionally ensure that there is at least an empty configuration
30 # file. This does *not* overwrite any existing configuration.
31 maas-rack config
32+chown maas:maas /etc/maas/rackd.conf
33
34 if [ "$1" = "configure" ] && [ -z "$2" ]; then
35 configure_logging
36diff --git a/debian/maas-region-api.postinst b/debian/maas-region-api.postinst
37index 1502dc1..aa0d8b2 100755
38--- a/debian/maas-region-api.postinst
39+++ b/debian/maas-region-api.postinst
40@@ -74,6 +74,7 @@ fix_dns_permissions() {
41 # Unconditionally ensure that there is at least an empty configuration
42 # file. This does *not* overwrite any existing configuration.
43 maas-region local_config_set
44+chown maas:maas /etc/maas/regiond.conf
45
46 if [ "$1" = "configure" ]; then
47 configure_logging

Subscribers

People subscribed via source and target branches