File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -121,6 +121,12 @@ if [ -f "$LIBVIRTD_FILE" ]; then
121121 ln -sf /etc/pki/libvirt/servercert.pem /etc/pki/libvirt-vnc/server-cert.pem
122122 ln -sf /etc/pki/libvirt/private/serverkey.pem /etc/pki/libvirt-vnc/server-key.pem
123123 cloudstack-setup-agent -s > /dev/null
124+
125+ QEMU_GROUP=$( sed -n ' s/^group=//p' /etc/libvirt/qemu.conf | awk -F' "' ' {print $2}' | tail -n1)
126+ if [ ! -z " ${QEMU_GROUP// } " ]; then
127+ chgrp $QEMU_GROUP /etc/pki/libvirt /etc/pki/libvirt-vnc /etc/pki/CA /etc/pki/libvirt/private /etc/pki/libvirt/servercert.pem /etc/pki/libvirt/private/serverkey.pem /etc/pki/CA/cacert.pem /etc/pki/libvirt-vnc/ca-cert.pem /etc/pki/libvirt-vnc/server-cert.pem /etc/pki/libvirt-vnc/server-key.pem
128+ chmod 750 /etc/pki/libvirt /etc/pki/libvirt-vnc /etc/pki/CA /etc/pki/libvirt/private /etc/pki/libvirt/servercert.pem /etc/pki/libvirt/private/serverkey.pem /etc/pki/CA/cacert.pem /etc/pki/libvirt-vnc/ca-cert.pem /etc/pki/libvirt-vnc/server-cert.pem /etc/pki/libvirt-vnc/server-key.pem
129+ fi
124130fi
125131
126132# Update ca-certs if we're in systemvm
@@ -138,6 +144,6 @@ if [ -f "$SYSTEM_FILE" ]; then
138144fi
139145
140146# Fix file permission
141- chmod 600 $CACERT_FILE
142- chmod 600 $CERT_FILE
143- chmod 600 $PRIVKEY_FILE
147+ chmod 750 $CACERT_FILE
148+ chmod 750 $CERT_FILE
149+ chmod 750 $PRIVKEY_FILE
You can’t perform that action at this time.
0 commit comments