Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
When I mount it manually it works loading with me as owner of the files and directories. When I plug the player into the usb and it mounts automatically then it loads with root as the owner and I have to use sudo to move anything in or out. Can this be fixed?
your really doing this the wrong way. it should be handle in linux through etc/udev/rules and set up a rule for that device so when it is plugged in the kernel loads it. Like a usb mic. Since you have no name for the device I have no way to find out.
a simple way is you change that fstab and plug it in and run lsusb and dmesg and see what you got. makes some rules for it. find out what the chip is.
Since your able to mount it the kernel module "aka drive" is loading.
as far as copying the stuff off it just do it and have fun.
if gvfs is installed and working, maybe it should handle that as well?
in combination with a polkit agent, maybe.
gvfs has plugins, maybe there's just one missing that can handle your (which? lsusb?) media player, e.g.: gvfs-mtp
I think there's nothing wrong with setting this up in fstab vs using udev rules. Since vfat does not have a native permission system like linux filesystems, handling permissions on vfat partitions is different. Different distros handle vfat permission options in the fstab entry a little differently, but the critical item is the umask entry. My Debian 9 vfat partitions have the following entries in fstab in the following form:
This was automatically setup by Debian at installation except for the "noauto" option.
The basic setup options I've used when handcrafting vfat entries is:
Code:
vfat user,noauto,exec,defaults,umask=0,rw 0 0
This pretty much worked everywhere and the critical thing is "umask=0". As you've experienced, if you don't have the proper fstab entry, the vfat partition will only be writable by root.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.