Only VM media directory needs restricted access
This commit is contained in:
parent
83522e7513
commit
1f0cbc02b9
1 changed files with 3 additions and 4 deletions
|
|
@ -125,8 +125,6 @@ create_clone() {
|
|||
|
||||
create_printerlist() {
|
||||
## Prepare .printerlist.csv
|
||||
mkdir -p "${VM_MEDIADIR}"
|
||||
chgrp "$(id -g)" "${VM_MEDIADIR}"
|
||||
echo "Name;IppURL" > "${VM_MEDIADIR}/.printerlist.csv"
|
||||
for p in $(lpstat -v | cut -f 3 -d" " | sed 's/:$//'); do
|
||||
echo "$p;ipp://192.168.122.1/printers/$p" >> "${VM_MEDIADIR}/.printerlist.csv"
|
||||
|
|
@ -208,7 +206,6 @@ EOF
|
|||
|
||||
QEMU='qemu:///session'
|
||||
|
||||
umask 077
|
||||
|
||||
NEWCLONE=0
|
||||
PERSISTENT=0
|
||||
|
|
@ -363,6 +360,8 @@ if ! virsh --connect="${QEMU}" list | grep "${VM_NAME}-clone"; then
|
|||
else
|
||||
VMINFO_DIR="/lmn/media/${USER}"
|
||||
fi
|
||||
mkdir -p "${VM_MEDIADIR}" -m 700
|
||||
chgrp "$(id -g)" "${VM_MEDIADIR}"
|
||||
create_printerlist
|
||||
create_mountlist
|
||||
|
||||
|
|
@ -370,7 +369,7 @@ if ! virsh --connect="${QEMU}" list | grep "${VM_NAME}-clone"; then
|
|||
[[ "${QEMU}" = 'qemu:///session' ]] && start_virtiofsd
|
||||
|
||||
# Create VMInfo Json file
|
||||
#( umask 027; ./vm-create-vminfo > "${VMINFO_DIR}/.vminfo.json" )
|
||||
#( umask 077; ./vm-create-vminfo > "${VMINFO_DIR}/.vminfo.json" )
|
||||
# Start vminfo.timer
|
||||
systemctl --user restart vminfo.timer
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue