LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Bodhi (https://www.linuxquestions.org/questions/bodhi-92/)
-   -   Unauthorized to unmount USB drive (https://www.linuxquestions.org/questions/bodhi-92/unauthorized-to-unmount-usb-drive-4175639246/)

Lighthorse 09-26-2018 07:12 PM

Unauthorized to unmount USB drive
 
I just installed Bodhi Linux 5.0.0 onto an Acer Notebook yesterday. After doing updates and getting Apps installed I decided to move some files via USB flashdrive from my PC (Makulu Lindoz) to install on the Bodhi Notebook. All went well,,created Document folder, Music folder etc., and moved the items into Bodhi. It uses the PCManfm as it's filemanager which I am unfamiliar with since I have previously been a Linux Mint user. When I select either "unmount volume" or "eject removable media" I get an error message that says: "Not authorized to perform operation". All I can do is shut it down to remove it. I would prefer NOT to have to do this thru the terminal each time, is there a setting I am missing to enable me to simply "click & eject" ?
Much appreciation,
Lighthorse

fatmac 09-27-2018 01:18 PM

Often there is Preferences under the Edit menu, you may be able to alter the behaviour in there.

Failing that, you should be able to unmount it from the command line using sudo or the root account.

(No need to shutdown the computer to disconnect/unmount it. :) )

BW-userx 09-27-2018 01:24 PM

linux, PCmanFM pluging in usb sticks. I just plug in and unplug. its called hot plugging. maybe if you give yourself sudo no passwd because mount and unmount is a root user thing, it may elevate that, or look at your polkit rules for hot plugging that too maybe what is causing this.

Lighthorse 09-27-2018 08:56 PM

Unable to unmount USB- Not Authorized
 
Fatmac, thanks for your feedback, I have been to the Edit preferences and there is nothing there to enable "unmount", although it does mention "during unmount....." so I would assume it is already an option to do so. I need someone physically running Bodhi to advice me if they are having the same issue and if and how they were able to resolve it. I am well aware that I can use the terminal to accomplish the task as I mentioned in my previous post, I prefer not to and would think I wouldn't have to.
I'll keep digging for info and help.

hemlocktree 09-27-2018 09:04 PM

maybe see the totsl thread for changing permissions

https://www.linuxquestions.org/quest...ns-4175638595/

Lighthorse 09-27-2018 09:10 PM

Unable to unmount USB- Not Authorized
 
BW-userx,
Thanks for your response albeit over my head. I will do some research into Polkit and see if I can figure out how to change permissions.

Background: I am a 64 yr old woman who has built 3 Linux systems from hardware compatibility up and installed and configured 7 various distros. I gained an AA in Computer Technology back in 1992 and built an 8088. Life changed after a major vehicle crash that broke my back and I had been out of touch with the field up until about 5yrs ago when I gave up on Windows OS. I have never been a programmer, so much of this is over my head, though I continue to learn on my own and from the help of others such as yourself. I appreciate any further thoughts or direction you might be able to point me towards. Until then, I guess I'll ask "The Google" to splain me some stuff, like how to find them darned permissions !

Lighthorse 09-27-2018 09:19 PM

Unable to unmount USB- Not Authorized
 
Hemlocktree,

Now that link looks helpful, I will check it out. In changing permissions, will this link be pertinent to ALL distros ? That's how "newbie" I am ! Looks like I have my homework cut out...right after the residual headache from yesterday dissipates.

Thanx again

frankbell 09-27-2018 09:20 PM

I am going out on a limb and speculate that the mounted drive is owned by root and that's why user can't unmount it. Looking at the "properties" of the drive in a file manager or the command

Code:

ls -l /path/to/USB/drive
should reveal who owns it.

https://linuxnewbieguide.org/how-to-...te-permission/

BW-userx 09-27-2018 09:23 PM

Quote:

Originally Posted by Lighthorse (Post 5908692)
BW-userx,
Thanks for your response albeit over my head. I will do some research into Polkit and see if I can figure out how to change permissions.

Background: I am a 64 yr old woman who has built 3 Linux systems from hardware compatibility up and installed and configured 7 various distros. I gained an AA in Computer Technology back in 1992 and built an 8088. Life changed after a major vehicle crash that broke my back and I had been out of touch with the field up until about 5yrs ago when I gave up on Windows OS. I have never been a programmer, so much of this is over my head, though I continue to learn on my own and from the help of others such as yourself. I appreciate any further thoughts or direction you might be able to point me towards. Until then, I guess I'll ask "The Google" to splain me some stuff, like how to find them darned permissions !

this is an old file I saved for this reason and used for same in I forget what distro's,
hopefully it will circumvent you having to research it. The only thing I'd do is research how polkit rules match this one as this file is a few years old, and that your system is using polkit, (has it installed).


this file is before systemD, old. and I have not had to use it in a few years, I think it was used on a Debian system. I've since moved away from that Distro. I just keep it in my dropbox account for just in case situations.


Code:

#[Allow Automount]
#Identity=unix-group:plugdev
#Action=org.freedesktop.udisks2.filesystem-mount
#ResultAny=yes
#ResultInactive=yes
#ResultActive=yes

# place in
#create dir if needed
#/etc/polkit-1/localauthority/50-local.d/automount.pkla



[Allow Automount]
Identity=unix-group:plugdev
Action=org.freedesktop.udisks2.filesystem-mount*
ResultAny=yes
ResultInactive=yes
ResultActive=yes

[Allow Eject]
Identity=unix-group:plugdev
Action=org.freedesktop.udisks2.eject-media*
ResultAny=yes
ResultInactive=yes
ResultActive=yes

[Allow Mounting of fstab]
Identity=unix-group:plugdev
Action=org.freedesktop.udisks2.filesystem-fstab*
ResultAny=yes
ResultInactive=yes
ResultActive=yes

as far as using Bodhi, it is an unsupported Disto, the maintainer/owner bailed out and basically removed everything on his sight about it. I got rid of my install of it when I seen that.

Lighthorse 09-27-2018 09:35 PM

Unable to unmount USB- Not Authorized
 
Hemlocktree,
Having read the link to the thread in your previous reply, I should add that I do not have an issue with "mounting" a USB flashdrive or moving files from it to my system or from the system back to the flashdrive.
The system simply will not allow me to "unmount" it...and yes I am aware that I can accomplish this in the terminal but would rather click "umount" and get on with the day so to speak. It just seems to me it should be a fully functional aspect of the system for a user ?
I am also investigating "hotplugging" as BW-userx has suggested, as I always thought just ripping it out would damage the USB drive.

BW-userx 09-27-2018 09:40 PM

as long as no read or write is being done on the medium it should not hurt it. though clicking on that little arrow to unmount it and getting an you're not authorized to unmount it very strange to say the lest. Especially when it mounts it by just plugging it in. That is just strange behavior.

I've never encountered such a thing on any distros I've ever installed. if it gives you too much grief I'd suggest moving on to a different disto, their are plenty more to pick from.

Lighthorse 09-27-2018 09:41 PM

Unable to unmount USB- Not Authorized
 
BW-userx,

So all of that code gets copied and pasted into the terminal ? Which line do I need to look at and can it be changed there ? I appologize, you are all being so kind to try to help me and right now my limited 3% of brain matter is swimming !
I am fairly fearless, afterall it is a new insatll and the worst that can happen is I crash it and have to start over eh ? Old lady with nuthin' but time but a little overwhelmed. :o)
Need to put myself on pause until tomorrow and look at all of this with fresh eyes in the morning.

Lighthorse 09-27-2018 09:52 PM

Unable to unmount USB- Not Authorized
 
Bw-userx,

I just now noticed your comment about how the owner baled on the project. Really Bodhi 5.0.0 the new release ? I swear it said it was supported for 5yrs. I may have to rethink this OS. I know I do not like Linux Lite, perhaps Puppy ? This is a small Acer Notebook 1.6ghz that I just want a small OS on to take with me on the fly, that works basically "out of the box." Any suggestions there ?
I have been running Linux Mint for 5 yrs and now have Makulu LinDoz on my desktop. I had installed ChaletOS on the Acer and liked it, but it too is no longer supported.
Thanks for all your help !
Lighthorse

BW-userx 09-27-2018 09:55 PM

Quote:

Originally Posted by Lighthorse (Post 5908701)
BW-userx,

So all of that code gets copied and pasted into the terminal ? Which line do I need to look at and can it be changed there ? I appologize, you are all being so kind to try to help me and right now my limited 3% of brain matter is swimming !
I am fairly fearless, afterall it is a new insatll and the worst that can happen is I crash it and have to start over eh ? Old lady with nuthin' but time but a little overwhelmed. :o)
Need to put myself on pause until tomorrow and look at all of this with fresh eyes in the morning.

first open a open a terminal and issue this command to see if that directory is present.

Code:

ls /etc/polkit-1/localauthority/50-local.d
or
ls /etc/polkit-1

and all you see is rules.d then
Code:

sudo mkdir -p /etc/polkit-1/localauthority/50-local.d
I use nano it is termanal based.
Code:

sudo nano /etc/polkit-1/localauthority/50-local.d/automount.pkla
it creates a blank file by that name automount.pkla in that terminal with nano open, copy all of the text off of here, then in the terminal ctrl+shitf+v or middle mouse button (depending on what terminal you are using) to paste it into file (nano). then ctrl+x to close it, you'll get a message save modified buffer press 'y' then hit enter key to save it. you have to be root or sudo to write to that side of system.

if you do not have nano installed, I hope you don't have to use vi. you can though some might disagree, use something like mousepad, or kwrite to do the same. using a terminal,

Code:

sudo (plain (flat file) text editor program name)  /etc/polkit-1/localauthority/50-local.d/automount.pkla
paste it into that then save it.

enigma9o7 09-28-2018 01:17 AM

I've had this happen if I sudo pcmanfm, as when it mounts the USB drive it does so as root and then other apps can't do stuff right. It sounds to me like the drive is probably mounted as root, it wouldn't hurt to try running pcmanfm as root and see if you can unmount it then, at least to confirm that's your issue.

I think gparted can unmount usb drives if it's run as root too as a possible alternative.


All times are GMT -5. The time now is 12:07 AM.