Samba and default chmod

Hi

This is my first post here and I think it's great that the freebsd project now got it's own forum.

I got a strange problem with samba and the default chmod only with one specific share.

my sbm.conf
[global]
...
# default create mode
create mode = 0770
directory mode = 0770
...
# shares
[it]
path = /mnt/data1/share/it
writeable = yes
...

Now the problem is, if any user saves a new file on this share the permission is set to 0700.
And I really don't know why, because on all other shares the permission is correctly set to 0770 as defined in my smb.conf.

I also checked the logs but I can't find any problems.

Does anybody know where this problem may come from?

Thanks for your help.
 
I'm not sure, but I've never seen these modes in the global section.
According to smb.conf they had to be defiened in each share section again.

mousaka
 
Hi

Thanks for your fast answer.

I'm sure it's correct to set create mode and directory mode in the global section to set the default.

@bsddaemon
You're right, but this won't fix my problem.

I now also tried to add "create mode" and "directory mode" in the share section.

# shares
[it]
path = /mnt/data1/share/it
writeable = yes
create mode = 0660
directory mode = 0770
...

but there is no change at all. :(
When I create a new directory, it's permission are still set to 0700.
And still the same problem when I create a new file.
I also tried "force create mode", same effect.

...
 
My guess would be your server local umask overrides samba settings

- Can you change the settings to:

force create mode = 0660
force directory mode = 0770

- Or, in server, run

umask 007

Now in the client, create a new dir in the share, let's see if the permission has been changed as you wish
 
Hi

I fixed the problem.
Because I had these problems only with two shares/directories, I recreated them directly on the console. Now the file permissions are set correctly.

Thanks for your help.

psunix
 
Back
Top