USB stick needs root permission

Questions about hardware and drivers
Forum rules
Before you post please read how to get help
Post Reply
bob-mint
Level 1
Level 1
Posts: 12
Joined: Fri Mar 27, 2009 4:51 am

USB stick needs root permission

Post by bob-mint »

Hello, I tried with different usb keys, various computers... but I always get a pop up window when a USB key is plugged: "Unable to open a folder for USB-xxx, No application is registered as handling this file". In fact it comes out that the USB is correctly mounted, but only root can read & write on it. Tried to chown but I get "operation not permitted".
Any workaround for this bug?
And no it's not a Debian problem, because I have other debian-based distros (MX, Q4OS, ...) where I can use USB as a normal user.
LMDE 4 Debbie with Cinnamon 4.6.7 and kernel 5.6.0
Intel NUC D54250WYK (Haswell) Core i5-4250U, Dual-Core, 1.3 GHz
User avatar
cpedretti
Level 2
Level 2
Posts: 86
Joined: Tue Mar 10, 2020 12:06 am

Re: USB stick needs root permission

Post by cpedretti »

bob-mint wrote:
Wed Aug 12, 2020 10:03 am
Hello, I tried with different usb keys, various computers... but I always get a pop up window when a USB key is plugged: "Unable to open a folder for USB-xxx, No application is registered as handling this file". In fact it comes out that the USB is correctly mounted, but only root can read & write on it. Tried to chown but I get "operation not permitted".
Any workaround for this bug?
And no it's not a Debian problem, because I have other debian-based distros (MX, Q4OS, ...) where I can use USB as a normal user.
LMDE 4 Debbie with Cinnamon 4.6.7 and kernel 5.6.0
Hi bob-mint, i had the same issue but with an external drive.

You need to change the owner of the group who are at this time the root user.

To know how are your current group just open an terminal in your desktop:

Code: Select all

ls -l
In the output you will see "my_user:my_group".


Yet we know and we can change the owner to have the right rights:

Code: Select all

sudo chown -R my_user:my_group /media/my_user/my_usb_key/

Code: Select all

sudo chmod -R 755  /media/my_user/my_usb_key/

Hope this can help you to solve your issue.
Last edited by cpedretti on Wed Aug 12, 2020 11:10 am, edited 1 time in total.
AMD Ryzen 7 3700X - 32GB DDR4 - Sapphire RX570 8GB - SSD SAMSUNG EVO 860/HDD Toshiba - Mobo Gygabyte AORUS ELITE B450 - PSU Gigabyte 750W Gold - Case Zalman X3 White

LMDE4 Kernel 5.9
jwiz
Level 3
Level 3
Posts: 157
Joined: Tue Dec 20, 2016 6:59 am

Re: USB stick needs root permission

Post by jwiz »

By default Debian allows only root to mount unknown drives.
This has always been the case as far as I remember it.
The exception being fat/fa32 formatted devices, because these file systems don't care about ownership.
bob-mint
Level 1
Level 1
Posts: 12
Joined: Fri Mar 27, 2009 4:51 am

Re: USB stick needs root permission

Post by bob-mint »

Hi guys thanks for replying, but may I ask if you are actually using LMDE? And in this case, did you try to plug in a simple USB key, which is normally formatted as FAT32 or NTFS for larger capacities?

@cpedretti : FAT32 and NTFS do not need any owner or group change since they do not manage owners and groups. But I even tried to format a key as EXT4 and still have the same problem. When I try to change owner or group (chown), as I said in my post, I get "operation not permitted" even though I do it with admin privileges.

@jwiz : As I said it's not a Debian problem. Your answer seems like you didn't even read my post.
Intel NUC D54250WYK (Haswell) Core i5-4250U, Dual-Core, 1.3 GHz
jwiz
Level 3
Level 3
Posts: 157
Joined: Tue Dec 20, 2016 6:59 am

Re: USB stick needs root permission

Post by jwiz »

I have a couple of fat32 formatted usb sticks here and LMDE4 auto-mounts them all writeable to /media/$USER/usb-stick.
If your fat/fat32 usb stick isn't, then there might be something wrong with the LMDE installation.
Other filesystems like etx2/3/4 etc. are only mounted with root pivileges and only root has write access to them, unless you change ownership as has been afore mentioned.
I'm not sure how ntfs formatted drives are handled by default, though.
linux-rox
Level 5
Level 5
Posts: 835
Joined: Sun Jul 19, 2020 9:17 pm

Re: USB stick needs root permission

Post by linux-rox »

bob-mint wrote:
Wed Aug 12, 2020 11:49 am
Hi guys thanks for replying, but may I ask if you are actually using LMDE? And in this case, did you try to plug in a simple USB key, which is normally formatted as FAT32 or NTFS for larger capacities?
Not my main machine, but I have Debbie installed in a test box. No trouble at all to mount, read, write, user privileges only. Tested both fat32 and NTFS, flash drive only for the first, both flash and USB hard drive for the latter.
Post Reply

Return to “Hardware Support”