Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's 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.
Change the owner of the mount point /media/OTR_MMSCIFI. Standard users by default generally have read/write access only to their /home/username directory and not to partitions on external devices. This is standard behavior in Linux. You can change the owner partitions. If the USB you are using is simply data it should not be a problem. Do you have a Linux filesystem on the usb?
Interesting, depends on what distribution/version you are running but most desktops these days automatically mount the drive when plugged in with r/w permissions for that particular user. A239-DFE4 would indicate a VFAT filesystem.
Typically linux permissions are by filesystem and not mount point of which VFAT is not compatible. You can manually mount the drive using mount options uid,gid that matches your user's uid and gid.
The USB is formatted as FAT32 - I use it on Windows systems and my TV to play movies.
Anyway, I changed ownership of /media/OTR_MMSCIFI to $USER
Code:
sudo chown $USER OTR_MMSCIFI/
So far so good, I plug in my USB stick and copy to it, but the files jist go tp/media/OTR_MMSCFIFI - not the USB stick
So I unmounted it
Then I mounted it
Code:
$ mount /dev/sdc1 /media/OTR_MMSCIFI
mount: only root can do that
Okay lets try this
Code:
sudo mount /dev/sdc1 /media/OTR_MMSCIFI
[sudo] password for jonke:
mount: /media/OTR_MMSCIFI: special device /dev/sdc1 does not exist.
I'm obviously doing this incorrectly, it cannot be so hard, all I want to do is to pop my usb stick into a port, and then cp a folder full of files to it.
[\quote]/dev/sdc on /media/username/TEST type vfat (rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0022...[/quote]
Here is output of mount for a FAT32 flash drive automatically mounted when inserted on my debian 12 system. The mount point /media/username/drive_label is automatically created and the drive mounted using uid=1000,gid=1000 which is the uid and gid for my user on this system. Without the uid,gid it will be owned by root.
Your mounting to /media/OTR_MMSCIFI but then copying to /media/jonke/OTR_MMSCIFI which does not work. Changing the owner of the mount point prior to mounting has no affect on the filesystem itself. I don't have a Mint VM at the moment but I would expect it to do something similar.
Linux user:group and rwx permissions do not apply on vfat filesystems, I missed that in your initial post. You can use fmask, dmask and/or umask in the /etc/fstab file or in your mount command. I expect the original location allowed you to copy as a user and likely would also work if you used "/media/jonke/OTR_MMSCIFI" as the mount point.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.