Bug 406874 - Trying to access a mounted CIFS share fails
Summary: Trying to access a mounted CIFS share fails
Status: REPORTED
Alias: None
Product: frameworks-solid
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Lukáš Tinkl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-25 06:31 UTC by Christian Muehlhaeuser
Modified: 2021-05-05 21:41 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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