[Samba] Write access to one user and Read-Only for anyother

Eric Boehm boehm at nortel.com
Wed Jun 20 15:13:18 GMT 2007


On Wed, Jun 20, 2007 at 11:53:59AM -0300, Maginot Junior wrote:
>>>>> "Maginot" == Maginot Junior <maginot.junior at gmail.com> writes:

    Maginot> the problem is if I set the write list or valid users Im
    Maginot> only giving the permission to those in the list... and
    Maginot> the big problem is how to set all other users to be in
    Maginot> the read list ... I dont have group with all inside and
    Maginot> are not going to be any... I tryed with something like


[memos]
   path = /home/memos
   write list = foouser
   read list = !foouser

No, you should use

[memos]
   path = /home/memos
   read only = yes
   write list = foouser

This will make it read only except for anyone in the write list. From
man smb.conf

     write list (S)
          This is a list  of  users  that  are  given  read-write
          access  to a service. If the connecting user is in this
          list then they will be given write  access,  no  matter
          what  the  read  only  option  is  set to. The list can
          include group names using the @group syntax.

          Note that if a user is in both the read  list  and  the
          write list then they will be given write access.

          This parameter will not work with the security =  share
          in Samba 3.0. This is by design.


Note the first paragraph -- "If the connecting user is in this list
then they will be given write access, no matter what the read only
options is set to."

-- 
Eric M. Boehm                  /"\  ASCII Ribbon Campaign
boehm at nortel.com               \ /  No HTML or RTF in mail
                                X   No proprietary word-processing
Respect Open Standards         / \  files in mail


More information about the samba mailing list