Jump to content

Photo

Ejecting media


Best Answer michmanbiker, 20 August 2017 - 02:40 PM

I tried to chmod /media to 755 but still get this:

 

michel@michel-Satellite-U400:~$ ls -l /media | grep $USER
drwxr-x---+ 2 root root 4096 Aug 20 10:34 michel
 
BUT now the usb drive ejects!@#$!???
Go to the full post


  • Please log in to reply
33 replies to this topic

#21 michmanbiker

michmanbiker

    Member

  • Members
  • 130 posts
  • LocationMontreal, Quebec, Canada

Posted 18 August 2017 - 09:15 PM

michel@michel-Satellite-U400:~$ ls -l /media
total 52
drwxrwxrwx  2 root root  4096 May 30 22:35 cdrom
drwxrwxrwx+ 2 root root  4096 Aug 17 21:32 michel
lrwxrwxrwx  1 root root     4 Jul 22 13:15 usb -> usb0
drwxr-xr-x  2 root root 16384 Dec 31  1969 usb0
drwxrwxrwx  2 root root  4096 Jul 22 13:15 usb1
drwxrwxrwx  2 root root  4096 Jul 22 13:15 usb2
drwxrwxrwx  2 root root  4096 Jul 22 13:15 usb3
drwxrwxrwx  2 root root  4096 Jul 22 13:15 usb4
drwxrwxrwx  2 root root  4096 Jul 22 13:15 usb5
drwxrwxrwx  2 root root  4096 Jul 22 13:15 usb6
drwxrwxrwx  2 root root  4096 Jul 22 13:15 usb7




A big thank you to everyone who contributes to Bodhi Linux


#22 michmanbiker

michmanbiker

    Member

  • Members
  • 130 posts
  • LocationMontreal, Quebec, Canada

Posted 18 August 2017 - 09:16 PM

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


#23 michmanbiker

michmanbiker

    Member

  • Members
  • 130 posts
  • LocationMontreal, Quebec, Canada

Posted 18 August 2017 - 09:16 PM

michel@michel-Satellite-U400:~$ dpkg -l gvfs*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                      Version           Architecture      Description
+++-=========================-=================-=================-========================================================
ii  gvfs:amd64                1.28.2-1ubuntu1~1 amd64             userspace virtual filesystem - GIO module
ii  gvfs-backends             1.28.2-1ubuntu1~1 amd64             userspace virtual filesystem - backends
un  gvfs-backends-goa         <none>            <none>            (no description available)
un  gvfs-bin                  <none>            <none>            (no description available)
ii  gvfs-common               1.28.2-1ubuntu1~1 all               userspace virtual filesystem - common data files
ii  gvfs-daemons              1.28.2-1ubuntu1~1 amd64             userspace virtual filesystem - servers
ii  gvfs-fuse                 1.28.2-1ubuntu1~1 amd64             userspace virtual filesystem - fuse server
ii  gvfs-libs:amd64           1.28.2-1ubuntu1~1 amd64             userspace virtual filesystem - private libraries


#24 michmanbiker

michmanbiker

    Member

  • Members
  • 130 posts
  • LocationMontreal, Quebec, Canada

Posted 18 August 2017 - 09:19 PM

michel@michel-Satellite-U400:~$ groups
michel adm cdrom sudo dip plugdev lpadmin sambashare
 
Please also note that I tried to erase and format the usb with gparted and command and had a lot of issues doing so with the drive being unavailable (busy)? Formats fine with windows.
 
Why is windows better than linux at formatting?


#25 Sprinterdriver

Sprinterdriver

    Member

  • Members
  • 23 posts

Posted 19 August 2017 - 05:51 PM

I had an oposite experience: Had one usb pen drive accidentally get two partitions (t make a bootable ISO on pendrive), windows seems to be able to only format the first one. Disk management in windows seems to be unable to delete first partition on a usb pen. So for that kind of Trouble I can do better with Gparted.

However Fat32 partitions takes a little more time to format using Gparted.

 

To answer the last question, go get windows source code. Then you can say anything about why windows perform/behaves different compared to Linux  :P



#26 Charles@Bodhi

Charles@Bodhi

    Old Faithful

  • Moderators
  • 4611 posts
  • LocationZeist, The Netherlands

Posted 19 August 2017 - 08:30 PM

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


#27 craigus

craigus

    Member

  • Members
  • 39 posts

Posted 19 August 2017 - 09:42 PM

 

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 ..



#28 michmanbiker

michmanbiker

    Member

  • Members
  • 130 posts
  • LocationMontreal, Quebec, Canada

Posted 20 August 2017 - 03:45 AM

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

 

I did



#29 michmanbiker

michmanbiker

    Member

  • Members
  • 130 posts
  • LocationMontreal, Quebec, Canada

Posted 20 August 2017 - 03:48 AM

michel@michel-Satellite-U400:~$ ls -l /media/
total 4
drwxrwxrwx 2 root root 4096 May 30 22:35 cdrom


#30 michmanbiker

michmanbiker

    Member

  • Members
  • 130 posts
  • LocationMontreal, Quebec, Canada

Posted 20 August 2017 - 03:56 AM

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


#31 Charles@Bodhi

Charles@Bodhi

    Old Faithful

  • Moderators
  • 4611 posts
  • LocationZeist, The Netherlands

Posted 20 August 2017 - 01:51 PM

(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


#32 Charles@Bodhi

Charles@Bodhi

    Old Faithful

  • Moderators
  • 4611 posts
  • LocationZeist, The Netherlands

Posted 20 August 2017 - 02:29 PM

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



#33 michmanbiker

michmanbiker

    Member

  • Members
  • 130 posts
  • LocationMontreal, Quebec, Canada

Posted 20 August 2017 - 02:40 PM   Best Answer

I tried to chmod /media to 755 but still get this:

 

michel@michel-Satellite-U400:~$ ls -l /media | grep $USER
drwxr-x---+ 2 root root 4096 Aug 20 10:34 michel
 
BUT now the usb drive ejects!@#$!???


#34 Charles@Bodhi

Charles@Bodhi

    Old Faithful

  • Moderators
  • 4611 posts
  • LocationZeist, The Netherlands

Posted 20 August 2017 - 03:33 PM

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






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users