CentOS – Samba Share – Read / Write (PART 22)

LAB 22: Samba Share – Read / Write

Now we will share the Exercise folder.

vi /etc/samba/smbd.conf

:set nu

: 303,208t308

[Exercises]

comment = Exchange exercises

path = /data/exercises

public = no

valid users = +teachers +students

read only = yes

 

change this line

writable = yes

 

to:

write list = +teacher

 

:x

service smb restart

chgrp teacher /data/exercises/

chmod 755 –R /data/exercises

ll

 

On DC2012

net use * /del /y

\\DNSSRV

Access folder Exercises as t1 and create a few files in it. Enter an example exercise

Now access that folder as a student. Try to read it and write something to it. You will see that Read is OK but write will fail.