"Failed to canonicalize path '/user_home/.config/systemd/user.control/mount.wants': Permission denied" repeatedly appear in /var/log/messages.

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux 8

Issue

  • In the /var/log/messages file, a systemd related log occurs continuously as shown below.
Dec  8 03:50:01 xxxxxxx systemd[2062541]: Failed to canonicalize path '/<user_home>/.config/systemd/user.control/run-user-862.mount.requires': Permission denied
Dec  8 03:50:01 xxxxxxx systemd[2062541]: Failed to canonicalize path '/<user_home>/.config/systemd/user/run-user-862.mount.requires': Permission denied
Dec  8 03:50:01 xxxxxxx systemd[2062541]: Failed to canonicalize path '/<user_home>/.config/systemd/user.control/mount.requires': Permission denied
Dec  8 03:50:01 xxxxxxx systemd[2062541]: Failed to canonicalize path '/<user_home>/.config/systemd/user/mount.requires': Permission denied
Dec  8 03:50:01 xxxxxxx systemd[2062541]: Failed to canonicalize path '/<user_home>/.config/systemd/user.control/run-user-862.mount.d': Permission denied

  • Please provide guidance on the impact, cause, and resolution for these logs.

Resolution

The issue occurs because systemd --user instances for specific users (e.g., user1) are encountering permission problems when accessing configuration paths within their home directories.
These instances rely on various configuration files located in directories such as ~/.config/systemd/ and $XDG_RUNTIME_DIR/systemd/,

among others listed in the man systemd.unit(5) manual.

]# man 5 systemd.unit
...
       ~/.config/systemd/user.control/*
       $XDG_RUNTIME_DIR/systemd/user.control/*
       $XDG_RUNTIME_DIR/systemd/transient/*
       $XDG_RUNTIME_DIR/systemd/generator.early/*
       ~/.config/systemd/user/*
       /etc/systemd/user/*
       $XDG_RUNTIME_DIR/systemd/user/*
       /run/systemd/user/*
       $XDG_RUNTIME_DIR/systemd/generator/*
       ~/.local/share/systemd/user/*
       ...
       /usr/lib/systemd/user/*
       $XDG_RUNTIME_DIR/systemd/generator.late/*

The root cause is typically incorrect ownership or insufficient permissions on the affected directories or files.

To resolve this issue, ensure that all relevant configuration files and directories are correctly owned by the respective users and have appropriate permissions to allow access.

sudo chown -R user1:user1 /home/user1/.config
sudo chmod -R u+rx /home/user1/.config

After correcting ownership and permissions, restart the user-level systemd instances to apply the changes.

systemctl --user restart

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments