Bug 406874

Summary: Trying to access a mounted CIFS share fails
Product: [Frameworks and Libraries] frameworks-solid Reporter: Christian Muehlhaeuser <muesli>
Component: generalAssignee: Lukáš Tinkl <lukas>
Status: REPORTED ---    
Severity: normal CC: chrisito, elvis.angelaccio, kde, kdelibs-bugs-null, nate, nick
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Christian Muehlhaeuser 2019-04-25 06:31:58 UTC
SUMMARY
Trying to access an auto-mounted CIFS share, Dolphin shows the error "An error occurred while accessing 'video on 192.168.1.2', the system responded: mount: /media/share: operation permitted for root only".

Dolphin doesn't actually need to mount the share, though, as it's auto-mounted by systemd. Simply trying to access the path would cause systemd mounting it correctly. In other words: I can "ls /media/share" on the terminal, causing it to be mounted, and can only then access it with Dolphin.

Example mount from /etc/fstab:
//192.168.1.2/share     /media/share  cifs    nofail,uid=someuser,credentials=...,x-systemd.automount   0 0
Comment 1 Kai Uwe Broulik 2019-04-25 08:01:54 UTC
It's a bit annoying that Udisks doesn't abstract that for us. Ideally if we issue a Mount call, it would see "oh, it should be automounted" and then no-op.

Not sure if there's a good way to abstract that in Solid. Pretending it's mounted is bad but having the mount call succeed just because x-systemd.automount is set is probably also not what we want.
Comment 2 Kai Uwe Broulik 2019-04-25 08:02:39 UTC
Nevermind, our fstab backend just calls "mount" cmdline tool instead of going through UDisks :D Re-assigning to Solid