Results 1 to 6 of 6

Thread: Share USB external drive between multiple users on same PC

  1. #1
    Join Date
    Oct 2011
    Beans
    54

    Share USB external drive between multiple users on same PC

    I am currently running Ubuntu Studio 20.10 on a Dell PC. I have a USB external drive that I would like to share between multiple users on the same computer. The drive is mounted at /media/myname/audio. When I switch users, I can see the drive; however, I cannot open it. I have the permissions set on the drive as: user=rwe, group=rwe, others=r. I have turned sharing on using the drive properties, and have samba installed. I have added the line in the smb.conf file "force user = myname". (Of course, myname is my real username). However, I still cannot open the drive. What should I be doing?

  2. #2
    Join Date
    May 2013
    Location
    Galiza
    Beans
    4,009
    Distro
    Ubuntu

    Re: Share USB external drive between multiple users on same PC

    Samba has nothing to do with sharing between users in the same computer; Samba is for network sharing exclusively.

  3. #3
    Join Date
    Oct 2011
    Beans
    54

    Re: Share USB external drive between multiple users on same PC

    Do you have any suggestions as to how I can get sharing to work?

  4. #4
    Join Date
    May 2013
    Location
    Galiza
    Beans
    4,009
    Distro
    Ubuntu

    Re: Share USB external drive between multiple users on same PC

    Not really because I don't know the specifics about that drive, partitions, file types, permission, etc.
    What I usually do is to avoid the automatic mount under /media with a simple setting change in Disks:

    Open Disks and select the partition
    Click the double cogwheel and choose "Edit mount point"
    Disable the auto option and enable to mount at the start
    Keep all the other options but change - for aesthetics only - the "identify as" to "LABEL=....."
    Save and enter the sudo password.

    Do this from all the users and you should be fine.

  5. #5
    Join Date
    Aug 2016
    Location
    Wandering
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: Share USB external drive between multiple users on same PC

    Quote Originally Posted by Music_Guy View Post
    Do you have any suggestions as to how I can get sharing to work?
    When you attach an external USB storage device to your system it automounts to a mount point at /media/your-user-name/XXX. The problem is Linux sets /media/your-user-name with special permissions ( acl ) that prevents anyone other than "your-user-name" from traversing the folder to get to XXX.

    Props to Morbius1

    If the disk is formatted as EXT4 you can use the "groups" to set the disk to a group both users belong too. Permissions on a Linux system are normally set to 755 for folders and 644 for files. But you can change that to 775 and 664, and set a group and then add both users to the group. Both will then be able to execute the disk, store and remove files. Basically all you would want.

    If the disk is formatted as NTFS you need to provide user and group during the mounting of the disk. You have the dmask (directory), fmask (file) and umask (user) options for that. To set the owner, use the uid and gid. Similar to EXT you set the GID and add both users to the GID.
    With realization of one's own potential and self-confidence in one's ability, one can build a better world.
    Dalai Lama>>
    Code Tags | System-info | Forum Guide lines | Arch Linux, Debian Unstable, FreeBSD

  6. #6
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Share USB external drive between multiple users on same PC

    • Put any users that need write access into the same unix group.
    • The file system to be shared should be a native Linux, not ntfs or fat-whatever. df -Th will show the file system.
    • https://ubuntuforums.org/showthread....=working+chgrp explains how to do ti and the rest.


    IMHO, using ACLs will just lead to pain later. using normal unix permissions is how this stuff works the last 45+ yrs.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •