[Samba] Permission for copied file/dir

Quinn Plattel qiet72 at gmail.com
Tue Jul 10 05:03:35 MDT 2012


Not sure if the masks work under the global category.  Have you tried to
put them under the share sections instead of the global section?

br,
Quinn

On Fri, Jul 6, 2012 at 6:52 PM, J Gao <jgao at veecall.com> wrote:

> On 12-07-04 04:30 PM, J Gao wrote:
>
>> Hello, everyone,
>>
>> My server is Samba 3.5 on Centos 6.2. It is a stand alone file server
>> and now I have trouble to set the correct permission.
>>
>> My goal is to set 0770 on all the share, including files and
>> directories. here is my smb.conf:
>>
>> [global]
>>          workgroup = GEO
>>          server string = Kappa - File Server
>>          interfaces = lo bond0 192.168.123.29/24
>>          hosts allow = 127. 192.168.123. 192.168.25. 10.66.77.
>>          log file = /var/log/samba/log.%m
>>          max log size = 1000
>>          security = user
>>          passdb backend = tdbsam
>>          guest account = nobody
>>          map to guest = Bad User
>>          remote announce = 192.168.25.255 10.66.77.25
>>          wins support = yes
>>          create mask = 0770
>> ;        force security mode = 0770
>>          force create mode = 0770
>>          directory mask = 0770
>>          force directory mode = 0770
>>          load printers = no
>>          printing = bsd
>>          printcap name = /dev/null
>>          disable spoolss = yes
>>
>> [homes]
>>             comment = Home Directories
>>          browseable = no
>>          writable = yes
>>          valid users = %S
>>
>> ------------------------------**---------------------
>>
>> Now the client using cifs.mount (Ubuntu 12.04) to mount their home dir
>> and use it to store files. When I test the permission, I observed:
>>
>> 1. If client create a file (or a directory), the the permission is
>> correct to set to 0770;
>> 2. But if copy a file for other location to this Samba share, the
>> permission get transferred. For example, if the local file permission is
>> 0744, it will keep this permission when it copied to the Samba share.
>> Same for the directories.
>>
>> I tried the "force security mode = 0770" and "security mask = 0770" but
>> without success.
>>
>> Could someone help me please? Thanks a lot.
>>
>> J Gao
>>
>>
>>
>>  bump
>
>
>
> --
>
> --
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/**mailman/options/samba<https://lists.samba.org/mailman/options/samba>
>


More information about the samba mailing list