Linux Samba share give write access to group

2.6k views Asked by At

I have installed on my raspberry pi running debian (raspbian) samba and samba-common-bin

Then I change the config of samba and add the following at the end:

[photocam]
comment = Photo taken from camera
path = /tmp/photocam/
valid users = @users
force group = users
create mask = 0755
directory mask = 0755
read only = no
browseable=Yes
writeable=Yes
only guest=no
public=no

I have created a user for samba with sudo smbpasswd -a pi

Then when I try to access it I can only read the files, I can't delete or create new ones...

2

There are 2 answers

0
user2040597 On

Ok, really stupid from my part, I have realised that the folder I used and created with root so I had to use chown and chgrp commands to put it to the right user.

0
user2996667 On

Yes you're right use chown command to change users to pi this will change all files in the current directory to

user=pi, group=pi

sudo chown pi:pi *

You may also need to set permissions on the files with chmod command. The following command will change all files in the current directory to

775 = rwxrwxr.x

sudo chmod 775 *