[CentOS] Samba share configuration: r/w for some users, read-only for others

Fri Jun 25 14:28:40 UTC 2010
Bowie Bailey <Bowie_Bailey at BUC.com>

Niki Kovacs wrote:
> Hi,
>
> I'm using Samba for some basic setups like open shares for everybody, or 
> restricted shares with Samba users and passwords. So far, everything 
> works fine.
>
> I have two situations which both more or less amount to the same, and I 
> don't know how to configure it. One is in a school, the other one in a 
> town hall.
>
> 1) In the school, I'd like to configure a share that is readable and 
> writable for all the teachers, and read-only for the students. The idea 
> is that the teachers can write some assignments or various papers and 
> then put them in the share so the students can access them (without 
> modifying them).
>
> 2) Similar setup in the town hall. The mayor wants to have a share where 
> he and his secretary can fully access the documents, write them and 
> modify them, and the library users can then access them read-only.
>
> Is this feasible with Samba? And if so, what would the according 
> smb.conf look like?
>   

Easily.  The conf would look something like this:

[sharename]
   path = /home/share
   public = yes
   writeable = no
   write list = user1, user2, user3
   browsable = yes
   printable = no

> Cheers from the sunny South of France,
>   

Cheers from the sunny south of the USA (Florida).   :)

-- 
Bowie