Bug 427891 - Use "better" defaults for automounting
Summary: Use "better" defaults for automounting
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Unclassified
Component: kcm_deviceautomounter (show other bugs)
Version: 5.20.0
Platform: Manjaro Linux
: NOR wishlist (vote)
Target Milestone: ---
Assignee: Torrie Fischer
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2020-10-17 19:19 UTC by Claudius Ellsel
Modified: 2020-12-07 19:36 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.21


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Claudius Ellsel 2020-10-17 19:19:46 UTC
SUMMARY
A pretty outstanding "feature" of Plasma compared to other environments or operating systems I have used is that it requires me to mount external devices every time before I can access them. I use external hard drives for data storage and it is annoying to have to mount them manually before accessing them (for example to upload stuff from the Browser).

After looking in Systemsettings I saw that there already is an option to automount external media and also and option to only allow that for previously mounted media. I can partly understand that one might not want to allow automounting for all external drives due to security concerns. A compromise might be to have all previously mounted drives automounted.

I am not sure whether this is the correct component, please move if it is not.
Comment 1 Nate Graham 2020-10-21 04:25:19 UTC
I agree, this annoys me all the time on new systems and I always turn on automounting. I don't know what the reason is for not doing this by default or how automounting could be a security threat for any typical users. Auto*run*, sure, but auto*mount*? That seems fine for any sane and typical environment outside of, like, illicit nuclear weapons programs.
Comment 2 Claudius Ellsel 2020-10-21 10:05:34 UTC
I am not experienced in that area. I read a comment from Martin Flöser regarding a different topic that file indexing might be a potential target to be exploited.

That is probably rather unlikely in practice, but still some thing to keep in mind, maybe.

But I am not sure whether security has been the reason to not have this on by default in the first place.

As I wrote, if the option to only mount previously mounted drives automatically those possible security concerns are most likely not relevant (if they have not already been that before).
Comment 3 David Edmundson 2020-10-21 11:27:12 UTC
> I don't know what the reason is for not doing this

argument against:
User A logs in and doesn't touch a USB stick
Switch user or logout
User B logs in, tries to safely remove some drive. Would this fail? 

argument against:
User plugins in USB stick
Opens isowriter/etcher
It fails

----

>I use external hard drives for data storage and it is annoying to have to mount them manually before accessing them (for example to upload stuff from the Browser).

Before we start making changes can you (or Nate) expand on the problem. You get a file dialog, you click on the drive in the sidebar it implicitly mounts and we see everything. When do we hit a problem?
Comment 4 Claudius Ellsel 2020-10-21 13:36:52 UTC
(In reply to David Edmundson from comment #3)
> > I don't know what the reason is for not doing this
> 
> argument against:
> User A logs in and doesn't touch a USB stick
> Switch user or logout
> User B logs in, tries to safely remove some drive. Would this fail? 

Interesting question.

> argument against:
> User plugins in USB stick
> Opens isowriter/etcher
> It fails

Ah, took some time for me to get this one. Your argument is that they require a drive to not be mounted. I think that at least etcher has a way to circumvent those problems (did not find something useful on a short search, but I think it automatically unmounts the drive), but not sure about that.

> >I use external hard drives for data storage and it is annoying to have to mount them manually before accessing them (for example to upload stuff from the Browser).
> 
> Before we start making changes can you (or Nate) expand on the problem. You
> get a file dialog, you click on the drive in the sidebar it implicitly
> mounts and we see everything. When do we hit a problem?

I have those drives connected before startup and don't remove them often. So I don't get any dialog like one gets when connecting a USB stick during a running session.

I also had bookmarked some folders on those drives in Dolphin. Trying to access those without mounting the corresponding drive before failed.

Also not sure about save dialogs in Firefox for example. I think I had a problem when I saved a file to an external drive folder before. When trying to save a similar file in a session some days later the save dialog was not able to conveniently offer the last used folder for those files, because the corresponding drive was not mounted.
Comment 5 Claudius Ellsel 2020-11-11 20:26:58 UTC
(In reply to David Edmundson from comment #3)
> argument against:
> User plugins in USB stick
> Opens isowriter/etcher
> It fails

I can confirm now that this is not a problem at all with Etcher. It just unmounts the drive automatically when starting the flash, so there is most likely no inconvenience introduced for the user.
Comment 6 Claudius Ellsel 2020-11-11 20:57:10 UTC
(In reply to David Edmundson from comment #3)
> argument against:
> User A logs in and doesn't touch a USB stick
> Switch user or logout
> User B logs in, tries to safely remove some drive. Would this fail? 

I just tested this as well. I mounted a USB drive with User A now and switched to User B. Dolphin shows that drive as mounted, but when clicking it User B cannot access it because it is mounted for User A. (This is an already existing bug that will be present a bit more prominent if drives get mounted automatically, I guess).

When trying to safely remove it as User B a password prompt opens. After typing in the password of User A (or admin, not sure) the stick gets unmounted.
Comment 7 Bug Janitor Service 2020-11-11 21:11:20 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/218
Comment 8 Bug Janitor Service 2020-11-11 21:11:20 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/218
Comment 9 Nate Graham 2020-12-07 19:35:37 UTC
Git commit 2cb4ef4d73b9135f0938c15020f57ed181904946 by Nate Graham, on behalf of Claudius Ellsel.
Committed on 07/12/2020 at 19:34.
Pushed by ngraham into branch 'master'.

Change default settings for automount

M  +2    -2    solid-device-automounter/lib/AutomounterSettingsBase.kcfg

https://invent.kde.org/plasma/plasma-desktop/commit/2cb4ef4d73b9135f0938c15020f57ed181904946
Comment 10 Nate Graham 2020-12-07 19:35:45 UTC
Git commit 2cb4ef4d73b9135f0938c15020f57ed181904946 by Nate Graham, on behalf of Claudius Ellsel.
Committed on 07/12/2020 at 19:34.
Pushed by ngraham into branch 'master'.

Change default settings for automount

M  +2    -2    solid-device-automounter/lib/AutomounterSettingsBase.kcfg

https://invent.kde.org/plasma/plasma-desktop/commit/2cb4ef4d73b9135f0938c15020f57ed181904946