[TriLUG] Samba on a RPi

Chris Bickhaus via TriLUG trilug at trilug.org
Sun Sep 6 19:24:20 EDT 2020


I believe you can set uid=<yourUserName>,gid=<yourGroupName> in the /etc/fstab entry for your USB drive in order to accomplish what you want.

Chris Bickhaus

> On Sep 6, 2020, at 5:51 PM, Matthew Glassman via TriLUG <trilug at trilug.org> wrote:
> 
> Hello folks,
> 
> I have what I'm sure is a simple question and answer, but I may be
> overthinking it.  I have a Raspberry Pi running Pi OS (formerly
> Raspian) and have installed Samba on it.  I have an external USB Hard
> Drive that I want to use as a remote storage device.
> 
> I have hooked up the USB drive, formatted it with an NTFS system, and
> created a mount point on the raspberry Pi.
> 
> I have created shares in Samba (one for myself and one for my wife)
> and created the required share folder location (in relation to the
> path designated in smb.conf).  I can mount the samba share with my
> samba credentials.  The issue I have is that everything on the mounted
> share is designated as root as user and group.  I can't chmod my own
> folder that I created even with a sudo issuance.   So is this
> happening at the mounting of the share (which I believe it is)?  If
> so, can I still mount the hard drive and still have it give  my perms
> and ownership for my share and my wife's perms and ownership for her
> share?
> 
> So in short..
> 1. External drive /dev/sda1 is mounted to raspberry Pi at /media/external
> 2. /media/external has samba shares /media/external/myshare and
> /media/external/hershare
> 3. I want to be able to have myshare have me as owner and samba group
> as group and similar for my wife's share.  Currently everything is
> root:root 777.
> 
> Regards,
> Matthew
> -- 
> This message was sent to: Chris Bickhaus <bick at bickhaus.net>
> To unsubscribe, send a blank message to trilug-leave at trilug.org from that address.
> TriLUG mailing list : https://www.trilug.org/mailman/listinfo/trilug
> Unsubscribe or edit options on the web    : https://www.trilug.org/mailman/options/trilug/bick%40bickhaus.net
> Welcome to TriLUG: https://trilug.org/welcome


More information about the TriLUG mailing list