Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I mounted a disk drive using UserA ==> /run/media/userA/myDisk .

userB is a member of the same group of userA.

Why can userB not access the mountpoints?

What do I have to do so I can get 2 users to be able to access disk drives / partitions at the same time?

Also to note the disks are encrypted.

I do not want chmod the files or directory to 777

share|improve this question
Is there any particular reason for this unusual mount point? In any case, please include the output of mount in your question. – Daniel B Jul 2 '14 at 6:59
@DanielB: The mount point is normal. It's the default location used by udisks2 for users' personal removable media. – grawity Jul 2 '14 at 7:24
up vote 0 down vote accepted

udisks2 intentionally makes removable devices private to the user. (By design, Linux is a multi-user system, and can potentially have several people having separate seats (displays, keyboards, USB ports) and connecting their own USB drives, so they should be separate from each other.) So all per-user directories under /run/media are limited to their owner only.

  • To make udisks2 place all mountpoints under /media, which it used to do in the past, you can install a n udev rule by placing the following in /etc/udev/rules.d/90-udisks2-shared.rules:


    Alternatively, you could move a specific device by configuring it in /etc/fstab, e.g.:

    /dev/mapper/luks-backups /mnt/backup auto noauto,nosuid,nodev,nofail,x-gvfs-show

    In fact, you should always use /etc/fstab for internal or otherwise fixed disks.

  • However, this will only allow other users to reach the mountpoint, it will not automatically allow them to browse files inside – you will need to change the files' permissions. This depends on the filesystem your disk is using.

    If you use ext4, btrfs, or generally any filesystem that supports Unix file ownership & permissions, use groupadd to create a dedicated group for users allowed to access the disk; gpasswd -a to add them to the group; then mount the disk and chown -R it to the newly created group. Use chmod -R g+rwX to make all files group-accessible, and find /mnt/disk -type d -exec chmod g+s {} + to make them inherit the group ownership.

    If you use fat32/vfat, do the same, but changing ownership or permissions will not work; instead, you will need to add the gid=... mount option in /etc/fstab. (The option should have the actual ID of the group that you just added.)

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .