Can't mount USB stick when two users logged in (Mate)

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
fiddlesticks

Can't mount USB stick when two users logged in (Mate)

Post by fiddlesticks »

If I have only one user logged in (Olivia, Mate), then my USB stick gets mounted properly. I find it a little odd that it's mounted under /media/user1/stickname rather than /media/stickname, but it works.

However, if I do a "switch user", keeping user1 logged in but also logging in as user2, then the USB stick can't get mounted any more - I guess the two users are fighting over where to mount it? Is there any way to solve this? Or does Mate have problems generally when switching users?
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.
fiddlesticks

Re: Can't mount USB stick when two users logged in (Mate)

Post by fiddlesticks »

This is unfortunately still an issue with Petra.
Is there a chance that it might be fixed with Qiana?
User avatar
austin.texas
Level 20
Level 20
Posts: 12003
Joined: Tue Nov 17, 2009 3:57 pm
Location: at /home

Re: Can't mount USB stick when two users logged in (Mate)

Post by austin.texas »

When the usb is mounted by the administrative user, in order to give other users access to the mounted drive, that user has to set the permissions for the mount point.
If the mount point is /media/user1name/stickname then the administrative user can enter the command:
sudo chmod -R a+rwX /media/user1

With that command, every folder and subfolder on the usb will be set to 777 (read, write, and execute permissions for all users)
and every file will be 666 (read, write, but not execute permissions for all users) - except those files that have been marked as executable, the X makes those accessable for every user.

You can also mount the usb drive with fstab when you boot, if it is plugged in. Then you would create a mount point and apply the permissions automatically.
Mint 18.2 Cinnamon, Quad core AMD A8-3870 with Radeon HD Graphics 6550D, 8GB DDR3, Ralink RT2561/RT61 802.11g PCI
Linux Linx 2018
fiddlesticks

Re: Can't mount USB stick when two users logged in (Mate)

Post by fiddlesticks »

I think you're saying that user2 should access the stick via /media/user1/stick (not /media/user2/stick) even though he/she may not know that user1 is logged in, and that user1 (who isn't here right now) should alter the permissions for the stick which user2 has just plugged in. Maybe I've misunderstood what you wrote, but that sounds crazy to me. And let's imagine that neither user1 nor user2 have any sudo privileges.

If only user2 is logged in, everything works fine, the stick is mounted at /media/user2/stick and user2 can read and write.
If only user1 is logged in, everything also works fine, just this time at /media/user1/stick.

The problem is when user1 has logged in and walked away, then user2 comes and plugs in a stick, and then neither user1 nor user2 can access it. It isn't mounted, so noone (not user1, not user2 and not any "administrator") can alter any permissions of any mounted stick. And often an "administrative user" isn't around for this quick job which (imho) shouldn't require administrator privileges.

Currently there's no fstab entry for usb stick(s), I don't think I need one, do I?

For those wondering why this "switch user" thing is important, it's because this is a laptop which often just gets its lid shut for suspend. So if somebody else picks it up and opens it, they have to use "switch user" to login. And then no USB sticks work.
Locked

Return to “Storage”