How to set read/write permissions on a Raspberry Pi set up as a network storage device

raspberry pisamba

I've followed the ff instructions on how to set up a Raspberry Pi as a simple network storage device:

How to Turn a Raspberry Pi into a Low-Power Network Storage Device

However I ran into a problem at the step after setting up permissions. I assumed adding this to samba.conf would set up the permissions:

comment = Backup Folder
path = /media/USBHDD1/shares
valid users = @users
force group = users
create mask = 0660
directory mask = 0771
read only = no

Unfortunately, no luck. The authentication steps afterward allowed readonly access to the storage device, but not write/modify access.

Any clues on what could be the problem?

Best Answer

Read up on chmod and chown. For example you can use chmod to do this:

chmod g+rwx /media/USBHDD1/shares

This allows any user who is part of the same group as the owner of the shares folder to read, write & execute the contents of the shares folder.