Niki Kovacs
2010-Jun-25 14:20 UTC
[CentOS] Samba share configuration: r/w for some users, read-only for others
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? Cheers from the sunny South of France, Niki
Bowie Bailey
2010-Jun-25 14:28 UTC
[CentOS] Samba share configuration: r/w for some users, read-only for others
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
Craig White
2010-Jun-25 15:27 UTC
[CentOS] Samba share configuration: r/w for some users, read-only for others
On Fri, 2010-06-25 at 16:20 +0200, 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? > > Cheers from the sunny South of France,---- yes, the same type of scenario chgrp teachers /share/files -R chmod 775 /share/files -R chmod g+s /share/files [sharename] path = /share/files public = yes browsable = yes printable = no create mode = 775 directory mode = 775 inherit permissions = yes Craig -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.