I have written the following automount unit for systemd:
/etc/systemd/user/home-federico-Cloud-unipg.automount
-----------------------------------------------------
[Unit]
Description="automount"
[Automount]
Where=/home/federico/Cloud/unipg
[Install]
WantedBy=default.target
The mount unit is:
/etc/systemd/user/home-federico-Cloud-unipg.mount
-------------------------------------------------
[Unit]
Description="mount"
[Mount]
Type=rclone
What=unipg:
Where=/home/federico/Cloud/unipg
Options=vfs-cache-mode=full,config=/home/federico/.config/rclone/rclone.conf,cache-dir=/var/rclone
After --user reloading the systemd daemon, I run the command systemctl --user enable --now home-federico-Cloud-unipg.automount and I get the following error in systemctl status:
home-federico-Cloud-unipg.automount: Failed with result 'resources'.
Failed to set up automount "automount".
The command journalctl -xe is not helpful since it says:
A start job for unit UNIT has finished with a failure.
The mount unit is working because if I run systemctl --user start home-federico-Cloud-unipg.mount I get the storage correctly mounted, so the problem is somewhere in the automount part.
Moreover, if I repeat the process as a system instance instead of user instance (replacing default.target with multi-user.target) I get the thing to work, even though the mountpoint is not accessible to user.
Can somebody help me to troubleshoot this?