hi, when i plug in an usb stick on fedora 36 xfce, i can not copy files to it in thunar (the filemanager). also in command line it does not work, because its mounted wrong. the owner is root but it should be the user that is running xfce, thats me, oli.
i had those problems about 10 years ago with ubuntu too, there i had to change some udev rules so that a user X that plugs in an usb stick, has the permission to create files on that stick.
anyone an idea where to change that? is it still udev that creates those /run/media/… directories?
By default external devices are mounted with ownership of root:root.
You would need to use the command (with the device mounted)
sudo chown -R USER:USER /run/media/USER/MOUNT
Replace USER with your actual username, and replace MOUNT with whatever the directory name is where it is mounted.
Once this change is made the system remembers it and will always give it the correct ownership the next time it is mounted.
Thanks, can you tell me “what” remembers that i changed the permissions?
The USB device file system itself.
It is also possible to write a udev rule so that anything getting mounted at /run/media/USER/DEVICE has ownership of the mount point set to USER, but that does not affect whatever ownership may be set internally on files & directories contained in that device.
i can confirm that it works. its so odd that some magic recognizes the chown and saves that information… guess i am getting old