Run virtiofsd in usermode and mount shares with correct gid.
- The new virtiofsd provides the ability to map a specified UID and GID to that of the user when running in user mode. As a result, virtiofsd is moved to userland for VMs and the new -uid and -gid options are introduced that specify the IDs on the guest.New v - The drives no longer have to be mounted with the group ID 1010. Therefore, the mount options are changed to the real group ID
This commit is contained in:
parent
8a9bebba65
commit
f201332a4b
6 changed files with 37 additions and 11 deletions
|
@ -36,12 +36,12 @@ elif [ "$#" -gt 0 ] && [ "$1" = '-o' ]; then
|
|||
echo
|
||||
mkdir -p "/lmn/media/${SUDO_USER}/oldhome"
|
||||
mkdir -p "/lmn/media/${SUDO_USER}/oldprojects"
|
||||
#errcode=$(mount -t cifs -o "username=${username},uid=${SUDO_UID},gid=1010,file_mode=0770,dir_mode=0770,forceuid,forcegid" \
|
||||
#errcode=$(mount -t cifs -o "username=${username},uid=${SUDO_UID},gid=${SUDO_GID},file_mode=0700,dir_mode=0700,forceuid,forcegid" \
|
||||
# "//192.168.1.2/DOCS/fvs" "/lmn/media/${SUDO_USER}/oldhome")
|
||||
#if [[ ! "${errcode}" ]]; then
|
||||
mount -t cifs -o "username=${username},uid=${SUDO_UID},gid=1010,file_mode=0770,dir_mode=0770,forceuid,forcegid,nobrl,mfsymlinks" \
|
||||
mount -t cifs -o "username=${username},uid=${SUDO_UID},gid=${SUDO_GID},file_mode=0700,dir_mode=0700,forceuid,forcegid,nobrl,mfsymlinks" \
|
||||
"//192.168.1.2/DOCS/fvs" "/lmn/media/${SUDO_USER}/oldhome"
|
||||
mount -t cifs -o "username=${username},uid=${SUDO_UID},gid=1010,file_mode=0770,dir_mode=0770,forceuid,forcegid,nobrl,mfsymlinks" \
|
||||
mount -t cifs -o "username=${username},uid=${SUDO_UID},gid=${SUDO_GID},file_mode=0700,dir_mode=0700,forceuid,forcegid,nobrl,mfsymlinks" \
|
||||
"//192.168.1.2/DATA/fvs/projekte" "/lmn/media/${SUDO_USER}/oldprojects"
|
||||
#echo "Mounting successfull!"
|
||||
echo "Einbindung erfolgreich!"
|
||||
|
@ -55,7 +55,7 @@ elif [ "$#" -gt 0 ] && [ "$1" = '-l' ]; then
|
|||
echo "Bitte auch Groß- und Kleinschreibung achten."
|
||||
read -rp "Username: " username
|
||||
mkdir -p "/lmn/media/${SUDO_USER}/linuxhome"
|
||||
mount -t fuse -o "allow_other,uid=${SUDO_UID},gid=1010,reconnect" \
|
||||
mount -t fuse -o "allow_other,uid=${SUDO_UID},gid=${SUDO_GID},reconnect" \
|
||||
"sshfs#${username}@home.steinbeisschule-reutlingen.de:" "/lmn/media/${SUDO_USER}/linuxhome"
|
||||
#echo "Mounting successfull!"
|
||||
echo "Einbindung erfolgreich!"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue