LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Bodhi
User Name
Password
Bodhi This forum is for the discussion of Bodhi Linux.

Notices


Reply
  Search this Thread
Old 03-03-2019, 12:53 PM   #1
madmax25
Member
 
Registered: Aug 2018
Posts: 136

Rep: Reputation: Disabled
BL.4.5.0-32bit - How to get privileges to remove thumbdrive without terminal, please?


Why am I not allowed to remove a thumbdrive by using the context option?
On both options "Unmount filesystem" and "Eject removable drive"
I always get the message, "Not allowed to perform operation".

Then I have to unmount that drive by means of terminology prior to being able to remove it.

How can I get these two context options to work without that message, please?

Last edited by madmax25; 03-05-2019 at 02:36 PM.
 
Old 03-03-2019, 01:32 PM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 9,918

Rep: Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077
A user can't remove a thumb drive if file actions are pending (e.g. writes not fininhed), if root mounted it, if any file on it is open, if any shell has cd'ed to it, if the sun is behind a cloud, etc etc.

Check these options first. 'lsof |grep <your mountpoint>' often helps
 
Old 03-03-2019, 02:51 PM   #3
madmax25
Member
 
Registered: Aug 2018
Posts: 136

Original Poster
Rep: Reputation: Disabled
It also happens with no pending actions.
 
Old 03-03-2019, 03:03 PM   #4
hemlocktree
Member
 
Registered: Aug 2018
Location: Northern Exposure
Distribution: Bodhi 5
Posts: 490

Rep: Reputation: 207Reputation: 207Reputation: 207
i have just removed it a few times with no issue

the command which i had to lookup and never remember as easy as it is is:


got this from our late friend Charles



The proper command for un-mounting is:
sudo umount /mountpoint/drivename
/mountpoint usually is /media/*
NB: /dev/sdXY is the hardware name, never a mountpoint for a drive
/drivename usually is /sdXY (sometimes it's the label of that drive)
NB: X is a drive letter, Y is a drive number
*
sda*usually is your internal HDD, so a USB drive would likely be sdb or sdc
*
You can probably find the drivename and where it is located when you look in the addressbar in your filemanager with the USB drive opened.
*
Hope this helps.
*
Enjoy,
Charles
See what you are trying to do is unmounting /dev/sdb1. That is impossible indeed. The prefix /dev is used for all devices in your or connected to your computer, but that location does not give access to that device. It had to be "transferred" into a "file" first. That is what the mounting does, giving it a filename in a different folder. For drives that would be /media.
The USB drive probably was inserted when booting and therefor not mounted by the filemanager with you as owner, that's why you can not unmount without sudo.
Try :
sudo umount /media/sdb1
When you insert a USB drive after being logged in the mounting will happen at a different moment and in that case you should have permissions to unmount it in the filemanager.
*
Hope my guessing is correct.**
*
Enjoy,
Charles
 
1 members found this post helpful.
Old 03-04-2019, 04:03 AM   #5
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 9,918

Rep: Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077
Funny, but glad what yopu have is working. I usually mount /dev/sdb1 (if required) on /mnt/hd. I have the 'user' option set, so the 'sudo' is not necessary. These two work for me.
Code:
mount/umount /dev/sdb1
mount/umount /mnt/hd
If I suspend with sdb1 mounted, then on restore, sdb1 is there, so the same disk becomes sdc1. Then I get silliness from the system trying to unmount sdb1, and I need the sudo.
 
1 members found this post helpful.
Old 03-04-2019, 04:52 AM   #6
madmax25
Member
 
Registered: Aug 2018
Posts: 136

Original Poster
Rep: Reputation: Disabled
What I would like to have is the "umount..." command associated with the context option "Unmount filesystem", because, I guess, afterwards the eject option would work, too.
Btw., other distros do support this, too.

Is there a way to do this in BL4.5.0 as well?

Last edited by madmax25; 03-05-2019 at 02:29 AM.
 
1 members found this post helpful.
Old 03-04-2019, 05:06 AM   #7
rbtylee
Bodhi Developer
 
Registered: Jun 2018
Location: Ladson, SC US
Distribution: Bodhi
Posts: 127

Rep: Reputation: 147Reputation: 147
Quote:
Originally Posted by madmax25 View Post
Why am I not allowed to remove a thumbdrive by using the context option?
On both options "Unmount filesystem" and "Eject removable drive"
I always get the message, "Not allowed to perform operation".

Then I have to unmount that drive by means of terminology prior to being able to remove it.

How can I get these two context options to work without that message, please?
Are you in the plugdev group? type groups into a terminal and see if that is in the list. If not add your user to that group.
 
1 members found this post helpful.
Old 03-04-2019, 08:42 AM   #8
rrashkin
Member
 
Registered: Aug 2018
Location: San Benito, Texas, US
Distribution: Bodhi Linux
Posts: 34

Rep: Reputation: Disabled
I can (usuall) unmount a labeled drive with it's label. For instance, if "ls /media/rrashkin" (rrashkin is home) shows "Kingston", then "sudo umount /media/rrashkin/Kingston" will work.
 
2 members found this post helpful.
Old 03-05-2019, 03:01 AM   #9
madmax25
Member
 
Registered: Aug 2018
Posts: 136

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rbtylee View Post
Are you in the plugdev group? type groups into a terminal and see if that is in the list. If not add your user to that group.
According to the terminal, I'm in the plugdev group, already.

What else can I do to make it work?
 
Old 03-05-2019, 05:05 AM   #10
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 9,918

Rep: Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077
I find that any of the references in /etc/fstab work. So, if they don't it's permission you're lacking. Address these points please
  • Are you trying to unmount as a user?
  • Have you the 'user' option set in /etc/fstab? Why not?
  • Is the drive automtically mounted at boot/resume, or have you the 'noauto' option set?
  • Are you aware that a luser can't unmount what root(and therefore booting) has mounted?
  • Are the drive(s) in question being mounted with the default options in /etc/fstab?
 
Old 03-05-2019, 06:45 AM   #11
madmax25
Member
 
Registered: Aug 2018
Posts: 136

Original Poster
Rep: Reputation: Disabled
Mounting a thumbdrive does work, no matter if I do it prior to booting or afterwards.
I'm talking only about unmounting.

In other distros (Mint, Xubuntu,...), I never needed to edit
the fstab in order to being able to unmount a thumbdive.
All you have to do there is to click the context option
to securely remove the drive and you're done, and you don't have to be more than user there.

Usually, a thumbdrive isn't part of the fstab, anyway.

I mean, Bodhi does in fact offer the context options for this kind of removal.
They simply don't work there, just because of the missing
unmount feature and I'm looking for a way to add these.

Last edited by madmax25; 03-05-2019 at 06:52 AM.
 
Old 03-05-2019, 10:20 AM   #12
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 9,918

Rep: Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077
you didn't even bother to read your own fstab. Some distros/GUIs have automount daemons. Go figure. If we can't get the basic information to address your problem, there's no point in trying to help you further.
 
Old 03-05-2019, 11:40 AM   #13
rbtylee
Bodhi Developer
 
Registered: Jun 2018
Location: Ladson, SC US
Distribution: Bodhi
Posts: 127

Rep: Reputation: 147Reputation: 147
Quote:
Originally Posted by business_kid View Post
you didn't even bother to read your own fstab. Some distros/GUIs have automount daemons. Go figure. If we can't get the basic information to address your problem, there's no point in trying to help you further.
Bodhi does indeed automount usb drives if it is configured to do so. This is controlled by the Places module and most likely is the default on installation. Hmmm anyways messing around with fstab prob would work but I have a theory ...

Bodhi uses udisk and in fact has both version1 and version 2 installed. Uncertain as whether both are needed to be installed or if both are installed on a default installation. I will look into that latter. But anyway Mounting and unmounting using udisk is controlled by policy kit. It is my theory that it is the policy kit stuff interfering with your ability to unmount a usb drive in pcmanfm.

Take a look at the files in /usr/share/polkit-1/actions

Particularly org.freedesktop.udisks.policy and org.freedesktop.UDisks2.policy. Both files have an action called filesystem-unmount-others

Edit these files as root and change the defaults of this action in both files to

Code:
    <defaults>
      <allow_any>yes</allow_any>
      <allow_inactive>yes</allow_inactive>
      <allow_active>yes</allow_active>
    </defaults>
Be sure you save the file and reboot. (I am unsure if rebooting is really needed but I did in my testing)

Hopefully this will help.
 
Old 03-05-2019, 12:46 PM   #14
madmax25
Member
 
Registered: Aug 2018
Posts: 136

Original Poster
Rep: Reputation: Disabled
I do have this code block in org.freedesktop.udisks.policy (I just edited the two no's into yes), but it is missing in org.freedesktop.udisks2.policy.

Shall I add it there?
In case of yes, what's the proper position for that code block?

Last edited by madmax25; 03-05-2019 at 01:20 PM.
 
Old 03-05-2019, 01:40 PM   #15
rbtylee
Bodhi Developer
 
Registered: Jun 2018
Location: Ladson, SC US
Distribution: Bodhi
Posts: 127

Rep: Reputation: 147Reputation: 147
If it is missing in udisk2 leave it as is. Have you rebooted and tried it?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
BL4.5.0-32bit - How to remove unused packages without damaging system? madmax25 Bodhi 13 02-07-2019 10:49 AM
[SOLVED] centos5 both 32bit glibc and 64 glibc exist, how to delete the 32bit version zousheng Linux - Newbie 2 04-03-2013 09:17 AM
Installing VMWare Workstation 7.x (32bit) on Mint 14 (32bit) 8trak Linux - Newbie 4 01-24-2013 08:35 PM
Fedora 13 32bit and then Linux Mint 32bit and then Ubuntu 10.04 32bit ciao303 Linux - Newbie 3 08-09-2010 11:03 PM
thumbdrive is auto mounting as both cd-rom & thumbdrive scott1042 Fedora 2 04-27-2007 05:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Bodhi

All times are GMT -5. The time now is 03:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration