How to mount USB devices and CDROM in PCMan with our user

I just installed a PC with very few resources here at my work and to save as much memory as possible, I installed Debian Testing us LXDE. The problem is that when I try to mount a flash memory or a CD-ROM through PCManFM, this one gets me a pop-up saying: Not Authorized.

In the case of USB memory, the solution I first found was the following:

1- Create in /half so many folders with the name usb, usb1 and so on, depending on the number of USB ports.

2- As always the first device is mounted with sdb, I added to the file / etc / fstab the following line:

/ dev / sdb1 / media / usb1 auto rw, user, noauto 0 0 / dev / sdb2 / media / usb2 auto rw, user, noauto 0 0 / dev / sdb3 / media / usb3 auto rw, user, noauto 0 0 / dev / sdb4 / media / usb4 auto rw, user, noauto 0 0

3- Then I gave it permissions and put the user in question as the owner of those folders:

# chmod -R 755 / media / usb * # chown -R user: user / media / usb *

I rebooted and the memories were mounted in those directories automatically. But CD-ROM I still had the same problem. I found the solution in the Archlinux Wiki.

1- As root we create the file /etc/polkit-1/localauthority/50-local.d/55-myconf.pkla (you can choose another name but it always has to end in .pkla).

2- We add the following inside:

[Storage Permissions] Identity = unix-group: storage Action = org.freedesktop.udisks.filesystem-mount; org.freedesktop.udisks.drive-eject; org.freedesktop.udisks.drive-detach; org.freedesktop.udisks.luks -unlock; org.freedesktop.udisks.inhibit-polling; org.freedesktop.udisks.drive-set-spindown ResultAny = yes ResultActive = yes ResultInactive = no

3- Then we add the user in the group STORAGE. If this group does not exist, we create it:

# addgroup storage
# usermod -a -G storage USERNAME

We reboot and ready.


The content of the article adheres to our principles of editorial ethics. To report an error click here!.

7 comments, leave yours

Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   mitcoes said

    In that case, I recommend you change it for an LMDE, based on debian but quite improved in my opinion, and although it still lacks some details, in my opinion, it has it.

    It is no coincidence that it is the most visited distro in August in distrowatch ahead of Arch and Ubuntu, which drops from its traditional first position to third.

  2.   @taregon said

    Something that happened to me was that using "slitaz" I did not mount the usb memory, what I had to do was boot into the system with the device stuck (if I know, how tedious to boot to see it mounted). Using Asturix if I can see the little window that appears to me but instead of what you have here, if I get the option to click or accept to open either USB or SD. It is as it says [mitcoes] but neither change distro, you do not want that if you adore, I also put my case to note that it happens to others with pcmanfm. 😉 only that in your case, you put a lot of analysis, congratulations 😀

    1.    elav <° Linux said

      Thank you. The truth was that it took me a lot of work to get to the solution at first, but hey, I already found it 😀

      Greetings and thanks for stopping by.

  3.   Ozkar said

    @elav: You didn't try installing policykit-1, I had a similar problem and it was the policykit-1 that was not installed.

    1.    elav <° Linux said

      I had already installed and reinstalled it and it was not working ..

  4.   KZKG ^ Gaara said

    Ah, why did you find the solution on the ArchLinux Wiki? HAHAHA ... so you can later criticize Arch, or the "masochists" who use it ¬_¬ ... come on, if it weren't for Arch users, you would have spent more work finding the solution 🙂

    1.    elav <° Linux said

      Precisely because of the work that Arch users go through and the masochism they undergo, is that so much is learned on their wiki hahahaha.