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.

hemlocktree 09-28-2018 05:35 AM

jeff did not bail out. he and the team are actively working on bodhi. careful what you say.

hemlocktree 09-28-2018 11:47 AM

as stated in another thread. NO - bodhi is as active as error with Jeff and the team.

enigma9o7 09-28-2018 04:53 PM

Yeah that's an odd thing to say, I completely missed that weird comment. The new release was only a few weeks ago. The website is fine, he's on this forum, he's on discord and responds fairly often, he responds on reddit too. The only thing is no more dedicated forums, I installed bodhi for the first time the day before the dedicated bodhi forums disappeared so I don't miss them as much as others, other than in google searches, but most are on internet archive.

Randy4bodhi 09-28-2018 05:00 PM

Quote:

Originally Posted by Lighthorse (Post 5908702)
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

I've been a Bodhi user for years. As far as I know the developer is still developing Bodhi. He just erased the forums because of some European legislation, that he felt threatened him. That was too bad because there was a lot of useful info in there. Now the website forum link points here. Alot of the Bodhi staff are here. I just talked to a bunch of them the other day.

hemlocktree 09-28-2018 06:26 PM

plus 10 RANDY!

BW-userx 09-28-2018 07:23 PM

Quote:

Originally Posted by Randy4bodhi (Post 5909003)
I've been a Bodhi user for years. As far as I know the developer is still developing Bodhi. He just erased the forums because of some European legislation, that he felt threatened him. That was too bad because there was a lot of useful info in there. Now the website forum link points here. Alot of the Bodhi staff are here. I just talked to a bunch of them the other day.

then they that are still on the team should know how to deal with this major quirk that the OP is experiencing. and fix it toot sweet. fair winds and clean installs to the bodhi team... cheers!

hemlocktree 09-28-2018 08:28 PM

maybe i should add y 1 cent into the slackware and manjaro area though i never used them. many people not familiar add their 2 cents here without knowing the bodhi experience. sometimes their info is apropros and sometimes i have seen they are way of base.all i am saying after a 16 plus hr day. man be nice.

BW-userx 09-28-2018 08:52 PM

Quote:

Originally Posted by hemlocktree (Post 5909044)
maybe i should add y 1 cent into the slackware and manjaro area though i never used them. many people not familiar add their 2 cents here without knowing the bodhi experience. sometimes their info is apropros and sometimes i have seen they are way of base.all i am saying after a 16 plus hr day. man be nice.

that was nice, if one develops the distro then who better should know the ins and outs of it? I've tried it briefly, and almost tried it again yesterday, but it is based on Ubuntututututututututututututututu. so I canceled that idea.

Lighthorse 09-29-2018 02:35 PM

Unable to Mount USB
 
I want to thank all of U for ur input and ideas, especially BW-userx, however I have decided after doing 4 installs of Bodhi, to bail on it. Seems too much time and energy to spend when all I want is a simple "out of the box" working Distro as a back-up system to take on the fly for basic internet functions and email. I am looking at MX-Linux, small, looks user friendly and minimal resource grabber AND it comes with a User Manual, wat a great idea !
Thanks again for giving me ur time, it was certainly appreciated.
Lighthorse

r0bur 04-15-2019 07:43 AM

Hello.

I've found the final solution for "Not authorized to perform operation" while "ejecting" an USB stick in the PCManFM.


1) Open "Terminology", get root permissions, and go to the /etc/polkit-1/localauthority/50-local.d directory:

Code:

$ sudo su -
# cd /etc/polkit-1/localauthority/50-local.d

2) Create polkit rule file /etc/polkit-1/localauthority/50-local.d/50-pcmanfm-eject.pkla:
Code:

# cat >50-pcmanfm-eject.pkla
[udisks2]
Identity=unix-group:plugdev
Action=org.freedesktop.udisks2.filesystem-unmount-others
ResultActive=yes
^D

(where last string "^D" means [Ctrl]+[D] keys pressing)

3) That's all.

P.S. I think there is a sense to put this polkit rule into distribution as /var/lib/polkit-1/localauthority/10-vendor.d/com.bodhilinux.desktop.pkla

crajor 08-02-2019 05:48 PM

i realize that this is an older thread that has not been looked at in awhile and the original poster may or may not have discovered
an answer possibly looking elsewhere. However, I feel there may be a way to keep from having to umount a USB drive by having
to use sudo to do so. I would suggest looking into editing the /etc/fstab file. There is an option that one could use in a
fstab listing called 'users' that allows users to mount and umount drives without having to be root. CD-ROMS are commonly
set up in this manner so that root access is not necessary to place and remove discs into the drive.
I would suggest looking at
Code:

man mount
,
Code:

man fstab
and
Code:

man umount
for some info. Could also do a web search 'USB and fstab' as well.
(I promise, all that my very next thing to learn is how to properly insert code). Hope this helps.


All times are GMT -5. The time now is 06:40 AM.