USB stick needs root permission

Questions about hardware and drivers
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
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
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Intel NUC D54250WYK (Haswell) Core i5-4250U, Dual-Core, 1.3 GHz
User avatar
cpedretti
Level 3
Level 3
Posts: 199
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 RGB White - RTX4060TI O8GB White- SSD NVME Crucial P5 500GB - Mobo Gigabyte AORUS ELITE B550 V2 - PSU Corsair RM750 White - Case Corsair 5000D Airflow White 7 fans AF120 ARGB - AIO Corsair H100I Cappelix 240 White
jwiz
Level 4
Level 4
Posts: 347
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 4
Level 4
Posts: 347
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 10
Level 10
Posts: 3334
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.
AndreaD
Level 1
Level 1
Posts: 1
Joined: Thu Jan 20, 2022 1:42 pm

Re: USB stick needs root permission

Post by AndreaD »

Hello

I have the same problem, 3 of my pendrives locked. I can only view the files now. I have seen someone suggesting

1. I put the pendrive in
2. I left click
3. I open as root
4. put my password in

so I have done that. It unlocked all the files (the little padlock icon went). At the top of the page a red line appeared with the notice "Elevated privileges"

So I can see the files and can print the files. At the same time, whenever I put the pendrive in, its locked again, and I have to go through this same process to unlock it. Additionally its still read only, What I have noticed and what my question is about now is that there is a Permissions section within the pendrive itself and it says I am a User/user.

How can I/Can I change this to admin since I am admin? And will that solve the problem?


cpedretti wrote: Wed Aug 12, 2020 11:07 am
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.
Locked

Return to “Hardware Support”