A GUI For Setting Up Mount Points And Permissions

Suggestions and feedback for Linux Mint and the forums
Forum rules
Do not post support questions here. Before you post read: Where to post ideas & feature requests
Post Reply
educatedidiot

A GUI For Setting Up Mount Points And Permissions

Post by educatedidiot »

I've been using Mint for four years. I'm still using it, and have no intention of changing, so I obviously like it. In fact, I've donated multiple times to the development team.
That said, nothing is perfect. I wanted to register an idea that I think, based on my experience and that of many others, would be a huge improvement.

From the time I first started using Mint, there have been two issues that have constantly cropped up, and they have a very large impact on useability:
1) Getting peripheral storage devices to mount
2) Being able to actually use those devices when they are mounted.

Here's an example of a recent experience I had. I'm currently using Mint 17.2 w/ 4.4 kernel.
I just got a new phone, with a 2GB SD card in it. I wanted to add some ring tones to the card, so I download them on my computer, then I plug the phone into my USB hub.
2GB SD card opens automatically in Caja. Great -- but I can't copy files to it. Permission denied. Not for the first time, I sigh and ask myself why, why, WHY?
As usual, start doing a search on the forums for a solution.

Tried this, recommended by a user:
Click on the desktop icon called usb0, which is the SD card. Right click and open it as root > enter password > right click > click properties > click permissions > change the owner from root to the user > set folder access to "create and delete files" > go to the bottom of the box and click on Apply Permissions to Enclosed Files.
But there was never any option to open as root. So much for that.

Tried right clicking from open SD window in caja.
No option to open as root.

Terminal command <sudo blkid> showed that the SD card was mounted at /media/usb0. Fine.

Tried chown -hR myusername /media/usb0
Operation not permitted
Tried sudo chown -hR myusername /media/usb0
Operation not permitted
Tried both of these from root directory
Operation not permitted

From open window of the SD in Caja, selected Edit from the menu, and Open As Administrator.
That worked; I was able to enter my password, get the SD open in a new window, and copy files to it.
But how to retain the ownership and permissions permanently?
Right clicked location usb0 > Properties and got into Permissions.
But nothing could be changed: Operation not permitted

Tried connecting phone w/ SD card direct to computer instead of through USB hub.
Nothing different; you have to open as administrator just as before in order to get write permission to the SD.

Tried looking at fstab. Opened terminal: <sudo gedit /etc/fstab>
No fstab settings are present. WHAT!? I've done this umpteen times before, WHY is fstab not opening up? Ok, looking in Caja > File System > /etc. There's no fstab folder. What? Oh, but there is fstab.d. Never saw that before. Is that a new-named equivalent that my recently updated kernel installed? Trying to open fstab.d in terminal does not work either; again, no file opens.
Sheesh. confused.
By sheer chance, i saw a forum post that had a command for getting into fstab. I noticed it was a bit different than what I was used to.
<gksudo gedit /etc/fstab&>
That worked. A bit of experimenting showed that leaving off the ampersand also worked, but w/ or w/o ampersand, the command with sudo did not work.
So now suddenly I have to use gksudo instead of sudo. And there's no fstab folder in /etc -- but still somehow <gksudo gedit /etc/fstab> opens up an fstab file. Oh well.

Since the SD was being mounted at /media/usb0, I got into fstab and added a new entry as follows:
UUID=0403-0201 /media/usb0 vfat owner,umask=000,users,noauto,dmask=000,user,fmask=000 0 0
(The UUID 0403-0201, according to a run of the command <sudo blkid> in the terminal, is the UUID of the SD card.)
According to past experience, this should have made the SD writable upon mounting.
Saved file, shut down and restarted to see if that would solve the problem.
No such luck.

I'm still not able to just plug in the dang phone, and access the SD card, without jumping through the hoop of opening it a second time, as administrator, after it first mounts.

Really, this is just ridiculous.
I mean, gaining read/write access to peripheral storage is just basic, basic functionality on a computer.
There is NO FREAKING WAY that such basic functionality should be this complicated. I honestly estimate that I am about twice as computer savvy as the average computer user. If it's this hard for me, it is definitely a total deal breaker for most computer users.

I get that there are "security" issues involved. But what good is security on your computer when you can't use your computer?

I respectfully insist that it is WAY past time that someone came up with a GUI type program that handles storage device mounting and permissions. I mean a program that would show all your storage devices (even those not yet mounted, but just connected to the computer), and their status as mounted, not mounted, where mounted, who owns them, what permissions they have, and options to change all that stuff.
Last edited by xenopeek on Sun Apr 08, 2018 3:05 am, edited 1 time in total.
Reason: removed use of / as newlines
Sir Charles

Re: A GUI For Setting Up Mount Points And Permissions

Post by Sir Charles »

Maybe "Disks" goes some way in doing what you want for storage devices. Though I tried it with my phone connected and it didn't show up in there. But in Thunar, I could mount it and access it for RW without root permissions. Perhaps Caja handles things differently.
Disks2.png
Disks3.png
altair4
Level 20
Level 20
Posts: 11453
Joined: Tue Feb 03, 2009 10:27 am

Re: A GUI For Setting Up Mount Points And Permissions

Post by altair4 »

Just a random observation:
Terminal command <sudo blkid> showed that the SD card was mounted at /media/usb0. Fine.
There is only one application that will automount things to /media/usb(0-9) and that is usbmount. Remove it:

Code: Select all

sudo apt-get remove usbmount
It was originally designed for a GUI-less system and interferes with how a modern operating system handles USB devices.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: A GUI For Setting Up Mount Points And Permissions

Post by Flemur »

educatedidiot wrote: Sun Apr 08, 2018 2:49 am<gksudo gedit /etc/fstab&>
That worked. A bit of experimenting showed that leaving off the ampersand also worked, but w/ or w/o ampersand, the command with sudo did not work.
Ampersand means "run it in background" - how that affects the program varies, e.g. "leafpad file &" acts normally (and you can still type in the terminal), "vi file &" you don't see anything. "fg" bring the program to foreground.
So now suddenly I have to use gksudo instead of sudo.
You should always use gksudo and not sudo for programs with a GUI.
And there's no fstab folder in /etc -- but still somehow <gksudo gedit /etc/fstab> opens up an fstab file. Oh well.
If that text file - it's not a folder - was missing, your system probably wouldn't boot. Try

Code: Select all

ls /etc/fs*
For copying files to the phone, I'd just use the terminal as root, or try a "gksudo caja", and copy the files and/or set permissions on the phone so you can copy the files.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
educatedidiot

Re: A GUI For Setting Up Mount Points And Permissions

Post by educatedidiot »

Wow. I wasn't expecting so many helpful comments as to how to solve my particular issue.

Marziano,
It seems you're using Cinnamon? I'm using Maté, and I've searched my entire computer for 'disks', and don't find anything that looks helpful, so apparently Caja does handle things differently. The graphics you posted looked intriguing. I would definitely consider just moving to Cinnamon if it has a better way of dealing with such things.

Altair4,
I will try removing usbmount and working with that for a while.

Flemur,
I do recall learning that sudo should not be used to open and run GUI programs. Only I could swear that I have seen somewhere that, to open fstab, you need to preface the command with 'sudo'. I would not have thought that gedit would be considered a GUI program. When you think about it, it really is one, but I had some notion to the contrary. No need to go into the reasons why. It seems that Terminal functionality has been modified to prevent potential problems with using 'sudo' inappropriately. That's a good thing; it's just that I wasn't aware it had been done.
Yeah, I knew fstab had to be living somewhere...just kind of weird that I couldn't access it as before.
The command <ls /etc/fs*> rendered
etc/fstab
etc/fstab.d

I don't see what that tells me.

Yes, I could use Terminal as root, but should one really have to use the Terminal at all to do a basic file copy or move? I'd say that should just be a simple drag & drop. Same comment would apply to using <gksudo caja> in Terminal (which I tried, BTW; to make a long story short, no peripherals were available).

I wasn't actually asking for any help in my post. If I had been, I would not have posted in Suggestions and New Ideas. The solutions offered actually seem to confirm my contention: It just should not be this difficult.
Of course, to write a GUI program to handle problems of mounting and permissions on peripheral storage could be very problematical too. I've heard that udisks, a backend prog that does a lot of storage handling, has issues. Even if these are solved, there is always the issue of maintaining a GUI in the face of future updates to various opsystem changes.
The fact remains that a better way is needed.

Even if the point was not to handle my particular issue, much gratitude to those who offered some input on that.
Sir Charles

Re: A GUI For Setting Up Mount Points And Permissions

Post by Sir Charles »

educatedidiot wrote: Mon Apr 09, 2018 2:36 am It seems you're using Cinnamon? I'm using Maté, and I've searched my entire computer for 'disks', and don't find anything that looks helpful, so ...
Hi,
I am using LM 18.3 Xfce which has Thunar as file explorer/archive manager. I suppose "Disks" should be available for 17.2 as well. You could check that by opening Synaptic Package Manager and searching for gnome-disk-utilty.
educatedidiot

Re: A GUI For Setting Up Mount Points And Permissions

Post by educatedidiot »

I left this for a while due to business, but here's a couple of final comments.

I did not have usbmount installed, so that is not the reason that my SD was trying to mount at /media/usb0.

I did as Marziano suggested and installed Disks. I plugged in my phone, and this time got a "failed to mount" notification. (It was still trying to mount at media/usb0). The SD was showing in Places, however. (When I clicked on it I got the "failed to mount" again). So I opened Disks. It showed all drives in the Device pane, whether mounted or not. That was nice. After selecting a drive, the right pane shows all kinds of info about it, including different partitions (if more than one). In the upper right corner I noticed three buttons: one for Unmount, another for Eject, another for More Actions. I selected the SD drive in the Drive pane, and since info in the right pane, under the graphic representation of the drive, showed the SD as unmounted, I clicked on the More Actions button to see if there was a mount option. There were some other potentially very useful options, but no mount option.
This was a bit disconcerting, but I soon noticed three icons under the drive graphic. Hovering over them showed the first to be a Mount button, the second to be Delete Partition, and the third to be *another* More Actions button. Clicking the latter showed an Edit Mount Options. Bingo. I opened this, selected Show In User Interface, and noted that auto-selected mount options showed up in the boxes below. The default selections looked good to me, so I clicked Automatic Mount Options to On, and clicked OK. Back in the right pane of the main window, I then clicked the Mount button under the drive graphic.
I was in business.

BTW, as is only partly evident from the above description, you can do a LOT of stuff besides select mount options and mount drives with this prog. There are even Create Disk Image and Restore Disk Image functions, so it seems this can be used as a full disk backup. Haven't looked into that yet. And among the info shown in the right pane was the exact model and version of my phone. This program is rather deep!
(I mention these things for those, like me, who were unaware of the existence of this tool).

This gnome disk utility (or Disks) seems to be essentially and actually the GUI for setting up mount points and permissions that I was suggesting as a basic need for Mint.
Which makes me wonder why it didn't come preinstalled in Mint 17.2. Maybe it's a recent creation?

I would say then that if it's not preinstalled in more recent versions of Mint it darned well should be.
I would say too that the More Actions button in the upper right corner of the GUI should include among its actions the Edit Mount Options that are found only in the more-difficult-to-locate More Actions button under the drive graphic.
Finally, I'd suggest that it be part of any denial of drive access notifications (like "failed to mount disk", or "failed to copy to disk: permission denied", etc.) that another notification be included; something like "you may want to check mount options using the gnome-disk-utility (Disks) program".
I would mark this thread solved, but I'm not sure that's appropriate for this section of the forum.
Thanks again all.
User avatar
AZgl1800
Level 20
Level 20
Posts: 11173
Joined: Thu Dec 31, 2015 3:20 am
Location: Oklahoma where the wind comes Sweeping down the Plains
Contact:

Re: A GUI For Setting Up Mount Points And Permissions

Post by AZgl1800 »

FWIW,

I have a Samsung Galaxy Note 4
Mint 18.3 Cinnamon

and nothing will detect the phone when it is plugged in.
I tried every disk utility in the menu, and installed U3-tool and nada, zilch.

The SDcard in this phone is buried deep inside, taking it out is super PITA.
LM21.3 Cinnamon ASUS FX705GM | Donate to Mint https://www.patreon.com/linux_mint
Image
educatedidiot

Re: A GUI For Setting Up Mount Points And Permissions

Post by educatedidiot »

"The SDcard in this phone is buried deep inside, taking it out is super PITA."

I sympathize there. Just pulling the SD out of the phone and plugging it into a card reader or adapter, then into the computer, is usually an easy workaround, which I did use when things weren't working from the phone itself.
This may be an obvious question, but since Marziano finds that Thunar works for him, do you have Thunar?
FrostyRussian

Re: A GUI For Setting Up Mount Points And Permissions

Post by FrostyRussian »

AZgl1500 wrote: Sun Apr 22, 2018 3:18 am FWIW,

I have a Samsung Galaxy Note 4
Mint 18.3 Cinnamon

and nothing will detect the phone when it is plugged in.
I tried every disk utility in the menu, and installed U3-tool and nada, zilch.

The SDcard in this phone is buried deep inside, taking it out is super PITA.
If your phone is not being detected then its probably drivers (or cable - probably isnt but still possible). Also its possible that you have to chose/allow file sharing in phone (when you connect phone to PC it will ask you what to do).
User avatar
AZgl1800
Level 20
Level 20
Posts: 11173
Joined: Thu Dec 31, 2015 3:20 am
Location: Oklahoma where the wind comes Sweeping down the Plains
Contact:

Re: A GUI For Setting Up Mount Points And Permissions

Post by AZgl1800 »

the phone is rooted, the menu to allow for file sharing does not show up anymore,
so, I just use a very neat WiFi app that gets the job done super fast.

https://play.google.com/store/apps/deta ... ilemanager

This is the single best FM to find and share pix/documents off a cellphone that I have ever come across.
It is so intuitive, and straight forward, it works every time.
LM21.3 Cinnamon ASUS FX705GM | Donate to Mint https://www.patreon.com/linux_mint
Image
Post Reply

Return to “Suggestions & Feedback”