Is it possible to prevent the umount connected via fstab hard drives? or at least add a warning in case of accidental clicking? I have several disks mounted and I don’t want to umount them off under any circumstances. Similar behavior already implemented for root partition.
Now I wonder if a user can just unmount such partitions without root privileges. I never tried it :\
You get appropriately prompted for permission elevation in that case
As I understand the code at src/filewidgets/kfileplacesitem.cpp · v6.14.0 · Frameworks / KIO · GitLab , the unmount/eject button is currently shown if it’s:
- Not where the filesystem root lives
- Not where your home directory lives
- Not a network share
- Not already disconnected
So I’m guessing that changing what shows the eject button would involve either some new hard-coded logic, or adding some new custom configuration (I could be off in how I’m interpreting all that, though!).
As an alternative approach, @kvasi would it work in your case to have the drive owned by the root user, so that you as a user can’t unmount it with a single-click?
I have been working on this area, but much is left to do KFilePlacesItem: use isSystem to deduce tearDownAllowed (!1788) · Merge requests · Frameworks / KIO · GitLab and the result isn’t clear.
Some user would want to be able to unmount from the places panel for sure.
That’s sort of 453890 – Umount icon unnecessarily shown for internal drives
Thanks for explaining
I think yes.