d32a Samba and default chmod - The FreeBSD Forums
The FreeBSD Forums  

Go Back   The FreeBSD Forums > Server & Networking > Web & Network Services

Web & Network Services Discussion related to network/web services such as apache, bind, sendmail, etc.

Reply
 
Thread Tools Display Modes
  #1  
Old December 8th, 2008, 11:56
psunix psunix is offline
Junior Member
 
Join Date: Nov 2008
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Question 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
Quote:
[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.
Reply With Quote
  #2  
Old December 8th, 2008, 12:05
bsddaemon's Avatar
bsddaemon bsddaemon is offline
Member
 
Join Date: Nov 2008
Location: Melbourne
Posts: 102
Thanks: 13
Thanked 7 Times in 7 Posts
Default

It should probably be:

Quote:
create mask = 0600
directory mask = 0700
You dont wanna have all share files created and marked as executable, do you?
__________________
...then the God created man...
Reply With Quote
  #3  
Old December 8th, 2008, 13:50
mousaka mousaka is offline
Junior Member
 
Join Date: Nov 2008
Location: Switzerland
Posts: 56
Thanks: 5
Thanked 7 Times in 7 Posts
Default

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
__________________
I thought of that while riding my bicycle.
--- Albert Einstein
Reply With Quote
  #4  
Old December 8th, 2008, 14:59
psunix psunix is offline
Junior Member
 
Join Date: Nov 2008
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.

Quote:
# 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.

...
Reply With Quote
  #5  
Old December 8th, 2008, 15:35
bsddaemon's Avatar
bsddaemon bsddaemon is offline
Member
 
Join Date: Nov 2008
Location: Melbourne
Posts: 102
Thanks: 13
Thanked 7 Times in 7 Posts
Default

My guess would be your server local umask overrides samba settings

- Can you change the settings to:

Quote:
force create mode = 0660
force directory mode = 0770
- Or, in server, run

Quote:
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
__________________
...then the God created man...
Reply With Quote
  #6  
Old December 31st, 2008, 07:25
psunix psunix is offline
Junior Member
 
Join Date: Nov 2008
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Talking

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
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
HOWTO: Samba PDC with LDAP backend Sylhouette Howtos & FAQs (Moderated) 36 October 16th, 2012 21:02
nmap can't detect the appropriate interface for the default route kantor Networking 9 March 25th, 2011 11:58
default local fonts Slesarev GNOME 18 December 12th, 2008 23:40
FreeBSD boot loader changes default phreud General 7 November 21st, 2008 00:02


All times are GMT +1. The time now is 08:06.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
The mark FreeBSD is a registered trademark of The FreeBSD Foundation and is used by The FreeBSD Project with the permission of The FreeBSD Foundation.
Web protection and acceleration provided by CloudFlare
0