Zaphod
Posts: 6
Joined: Fri Feb 24, 2012 3:22 pm

Pi4 Samba USB Share

Sun Jul 21, 2019 8:56 am

Hi,

I had a Samba share set-up on a PI3B+ and I have just bought a PI4 and transferred the USB drive and then setup Samba in theory the same. I can view all the files on the USB drive, I can also pen them (pictures) but I can't change or add anything.

smb.conf:

[public]
comment = public storage
path = /media/pi/Data/Backup
valid users = pi
force group = pi
create mask = 0775
directory mask = 0775
read only = no
writeable = yes

changing workgroup to match Win 10 machine made no difference

ls -l:

total 4
drwxrwx--- 1 pi pi 4096 May 27 19:36 Pictures
drwx------ 1 pi pi 0 May 26 17:52 'Pictures - Archive'
pi@raspberrypi:/media/pi/Data/Backup $

I have tried lots of settings, but have obviously messed something up.

User avatar
DougieLawson
Posts: 39120
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Pi4 Samba USB Share

Sun Jul 21, 2019 9:02 am

What format is the filesystem on that drive.

If it is NTFS you need to install ntfs-3g to get read/write access to it.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

Zaphod
Posts: 6
Joined: Fri Feb 24, 2012 3:22 pm

Re: Pi4 Samba USB Share

Sun Jul 21, 2019 9:21 am

Thanks - that fixed it. Knew it was something I missed.

User avatar
DougieLawson
Posts: 39120
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Pi4 Samba USB Share

Sun Jul 21, 2019 9:29 am

Zaphod wrote:
Sun Jul 21, 2019 9:21 am
Thanks - that fixed it. Knew it was something I missed.
Reformat the drive to a native Linux filesystem and it will run three times faster. NTFS on Linux is an ugly hack.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

cpc464
Posts: 239
Joined: Tue Jul 08, 2014 5:10 pm
Contact: Website

Re: Pi4 Samba USB Share

Sun Jul 21, 2019 9:35 am

Hi OP,

On the subject of file systems, I also obtained better Pi 4/Samba performance from XFS. I would recommend it over ext4 in this case.

Speeds were 65 megabytes/s for writing, 105 megabytes/sec for reading, and peaking at 125 megabytes/s (which saturated the Gigabit network!). Terrific performance from the Pi 4, probably better then many domestic NAS products.

Jim.
Unix engineer since 1989

hortimech
Posts: 426
Joined: Wed Apr 08, 2015 5:52 pm

Re: Pi4 Samba USB Share

Sun Jul 21, 2019 11:28 am

Zaphod wrote:
Sun Jul 21, 2019 8:56 am

Code: Select all

[public]
  comment = public storage
  path = /media/pi/Data/Backup
  valid users = pi
  force group = pi
  create mask = 0775
  directory mask = 0775
  read only = no
  writeable = yes
Interesting name for a share that isn't public :)

Only the user 'pi' or members of the group 'pi' (usually just 'pi') will be able to connect to it, so the two 'masks' are a bit strange, surely '0770' would be more apt. Also 'read only = no' and 'writeable = yes' mean the same thing, so you only need one of them

Return to “General discussion”