-
Notifications
You must be signed in to change notification settings - Fork 461
vmware-user-suid-wrapper creates dconf files with root ownership in MATE desktop environment, causing permission denied errors #784
Description
Describe the bug
When running open-vm-tools on Ubuntu 22.04.3 with MATE desktop environment, the vmware-user process (via vmware-user-suid-wrapper) creates the dconf configuration file /run/user/UID/dconf/user with root ownership instead of user ownership. This causes permission denied errors and prevents MATE desktop components and applications from functioning properly.
Key observations:
- This issue is MATE-specific and does NOT occur in GNOME environments
- The problem occurs when users exit fullscreen mode, disconnect, and reconnect to sessions
- The same version of open-vm-tools works correctly in GNOME, indicating the issue is specific to how the suid wrapper handles privilege dropping in MATE
- Issue has been verified to persist across multiple open-vm-tools versions
Affected Components:
- mate-settings-daemon
- blueman-applet
- mate-power-manager
- Any application relying on dconf
Reproduction steps
- Install Ubuntu 22.04.3 (Jammy Jellyfish) with MATE desktop environment
- Install open-vm-tools (tested with versions 2:12.1.5-ubuntu0.22.04.2)
- Start a VDI session
- Verify dconf/user file is owned by the user
- Exit fullscreen mode
- Disconnect from the VDI session
- Reconnect to the VDI session
- Verify dconf/user file ownership again
Expected behavior
The /run/user/UID/dconf/user file should be created and maintained with user ownership (not root), allowing the user's desktop session to properly read and write dconf settings. This behavior should match what is observed in GNOME environments.
Additional context
Environment:
- OS: Ubuntu 22.04.3 (Jammy Jellyfish)
- Desktop Environment: MATE (issue does NOT occur with GNOME)
- open-vm-tools versions tested: 2:12.1.5-3ubuntu0.22.04.2
- Both versions exhibit the same issue
Error Message from the logs:
dconf-CRITICAL **: unable to create file '/run/user/107094/dconf/user': Permission denied. dconf will not work properly.
mate-settings-daemon: dconf-CRITICAL **: unable to create file '/run/user/107094/dconf/user': Permission denied
blueman-applet: dconf-CRITICAL **: unable to create file '/run/user/107094/dconf/user': Permission denied
Gtk-CRITICAL **: Unable to create user data directory '/homes/dovska/.local/share' for storing the recently used files list: Permission denied
PowerManager-ERROR **: Error in dbus - GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: Permission denied
Workaround
A wrapper script that explicitly sets user environment variables before calling vmware-user-suid-wrapper resolves the issue, confirming the root cause is in vmware-user-suid-wrapper's environment handling in MATE.
Wrapper Script:
Wrapper Script we set up:
(/usr/local/bin/vmware-user-wrapper):
#!/bin/bash
export HOME="/home/$USER"
export USER="$USER"
export LOGNAME="$USER"
export XDG_RUNTIME_DIR="/run/user/$(id -u)"
exec /usr/bin/vmware-user-suid-wrapper
(Make the script executable: chmod +x /usr/local/bin/vmware-user-wrapper)
The we modified the vmware-user.desktop Entry (/etc/xdg/autostart/vmware-user.desktop):
[Desktop Entry]
Type=Application
Name=VMware User Agent
Exec=/usr/local/bin/vmware-user-wrapper
With this workaround, the issue does not occur in MATE.