On Mon, Mar 13, 2023 at 2:34 PM Simão <freedesktop.org@xxxxxxxxx> wrote:
I have the following entry in my fstab:
```
/home/simao/bin/encfs-mount#sync /home/simao/sync fuse noauto,user,owner,x-systemd.automount,allow_other 0 0
```
This calls my encfs-mount script to mount an encfs volume. That script uses `sudo -u simao` to actually call encfs, because I want the volume to be mounted as a user.
Running `sudo systemctl start home-simao-sync.mount` mounts the volume correctly, and I can access it as a normal user.
But umounting the volume and enabling `home-simao-sync.automount` does not work, I get the following in `journalctl`:
```
Mar 13 10:02:35 asterix sudo[476185]: pam_unix(sudo:session): session opened for user simao(uid=1000) by (uid=0)
Mar 13 10:02:36 asterix mount[476190]: fusermount: user has no write access to mountpoint /home/simao/sync
Mar 13 10:02:36 asterix mount[476188]: fuse failed. Common problems:
Mar 13 10:02:36 asterix mount[476188]: - fuse kernel module not installed (modprobe fuse)
Mar 13 10:02:36 asterix mount[476188]: - invalid options -- see usage message
```
That directory has the correct permissions, otherwise `.mount` would not work.
Running my script with strace, the only interesting line is:
```
Mar 13 10:00:14 asterix mount[475558]: touch: setting times of '/home/simao/sync': Permission denied
```
But I can touch that dir as my user.
Any ideas of what might be wrong?
An automount placeholder is, itself, a special kind of mount – as long as the .automount unit is active, the path is no longer owned by you because the "sync" directory has an 'autofs' filesystem mounted on top of it. (See `findmnt`.)
--
Mantas Mikulėnas