Jump to content
  • 0
michmanbiker

Ejecting media

Question

Hello, Whenever I try to eject my phone or a USB drive using pcmanfm, I get an error message saying i do not have the permission to do so.

 

Do I have to launch pcmanfm as sudo to be able to do so? Is there an easier way to do it?

 

Thanks,

 

Michel

Share this post


Link to post
Share on other sites

Recommended Posts

  • 0

Unmount and disconnect all your removable storage media before going on.

 

First clean your /media folder from everything except the cdrom folder and restore its permissions. Your $USER folder will be recreated later.

This should be the only thing in there. (Hope you did not poke in the permissions for the main /media folder itself.)

charles@B64-S4216:~$ ls -l /media/

total 8
drwxr-xr-x  2 root root 4096 mei 31 04:35 cdrom

Now install the package gvfs-bin as pcmanfm needs this to mount removable media correctly.

sudo apt-get install gvfs-bin

Reboot your computer. Open terminology and check the folders after every step:

ls -l /media

Insert the pendrive and in the menu > Places click Home. The pendrive should appear in the left pane ( view Places) 

ls -l /media

Your $USER folder should be created now, permissions root root are OK.

In pcmanfm click on the pendrive name. A little arrow should appear next to it. ( If you configured automount on insert you can skip this step)

ls -l /media
ls -l /media/$USER

Now in either of these results the pendrive mountpoint should appear with your username for owner and group.

Sometimes in /media and sometimes in /media/$USER, I don't know why. If in $USER the little arrow seems to function. If in /media it does not but what always works is Right-Click on the pendrive name in the left pane and choose Eject. 

 

Enjoy,
Charles

Share this post


Link to post
Share on other sites
  • 0

 

If in /media it does not but what always works is Right-Click on the pendrive name in the left pane and choose Eject.

 

I've just struck this problem today with (4.2.0 32 bit). Right clicking and choosing eject or unmount gives the same permission error as using the eject symbol. The USB stick is automounted in /media ..

Share this post


Link to post
Share on other sites
  • 0
michel@michel-Satellite-U400:~$ ls -l /media

total 8

drwxrwxrwx 2 root   root   4096 May 30 22:35 cdrom

drwx------ 2 michel michel 4096 Dec 31  1969 E026-D0AE

michel@michel-Satellite-U400:~$ ls -l /media/$USER

ls: cannot access '/media/michel': No such file or directory

 

:(  :(  :(  :(

 

Still cannot eject the drive

Share this post


Link to post
Share on other sites
  • 0

(Hope you did not poke in the permissions for the main /media folder itself.)

 

I did

 

 

media permissions should look like this:

drwxr-xr-x   4 root root  4096 aug 20  2017 media

Share this post


Link to post
Share on other sites
  • 0

What are your settings for Places? (Menu>SettingsPanel>Files>)

Please uncheck the lines with Mount volumes. Creating the $USER folder is done when you click on the pendrive name in the left pane.

 

PCmanfm uses dbus instances per user. And it is dbus that creates the $USER folder. This is the deeper cause for all the issues we have.

Wish I could find a way to change the options for mount command in pcmanfm, but this is starting to look like a bug in pcmanfm more then anything else.

 

I did not notice this because I only use automount for drives that are mentioned in my fstab. All removables I do mount myself in pcmanfm by clicking on the name in the leftpane.

Having that as my workflow the eject option with rightclick works, I avoid using the little arrow.

 

PCmanFM was started as LXDE filemanager I think and AFAIK it still is the default in Lubuntu. Maybe trying things out in Lubuntu gives some more clarification. Not sure I can find the time for doing that.

 

Enjoy,

Charles

Share this post


Link to post
Share on other sites
  • 0

So the $USER folder got created as it should.

 

ls -l /media/michel should now show the usb-drive with you as owner. That's how pcmanfm is designed to work but for some reason other mechanisms interfere. That's why it is probably better to wait for the pop-up after insertion. The default proposed action is Open in Filemanager and that results in a working arrow and /or rightclick on my machine.

 

Enjoy,

Charles

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×