PDA

View Full Version : samba config ....lost


bluejuice
2004-12-24, 01:04 AM CST
Background: I have 3 pc's (2-XP + 1-98) networked to a server (FC1). I have set up the users with user names (ie patrick) and into groups (ie esmith).

Problem:
When user (patrick) saves a file to the server, the resulting permissions of that file are;
Owner: patrick
File group: esmith
Text view -rwxr--r--
number view 744

This creates a problem because now when another member of the same group wishes to modify and resave this file they are denied. I wish to enable full read and write access to all group files by all members of that group. How do I do this, as so far I have made many attmepts with the resulting smbconf looking like this:

comment = share out subdirectory in e-smith for win98
path = /home/e-smith/files/ibays/stretchmarks/files
; valid users = jeremy patrick pamela serene sue
; public = no
browseable = yes
writable = yes
; read list = @e-smith
; write list = @e-smith
; printable = no
; force group = e-smith
; force user = e-smith
; force mask = 0770
; directory mask = 0770
; force create mode = 0770
; force directory mode = 0770

as you can see i have cut an paste much of what i have found on this site, but to no avail...i should perhaps point out that I am very NEW to this, as is probably clear in my config.

thanks in advance

duncan
2004-12-25, 03:38 PM CST
The semi colons (;) are comments.
refer to the "create mask" in
man smb.conf
Hope that Helps

bluejuice
2004-12-27, 04:59 AM CST
man do I feel dumb...thanks for the slap in the face :) , btw does the config look ok (if i remove the semicolons that is) would it achieve what I was hoping for and more to the point is it reduntant on any account (since I made numerous inclusions in the possess of trying to troubleshoot this issue) could it be simplfied or made more effective?

duncan
2004-12-27, 05:27 AM CST
Bluejuice:
I think it was a bad choice Samba to use a semi-colon for a comment, they probably should have stuck with a '#' like everywhere else.
I copied this example from /usr/share/doc/samba-3.0.10/Samba-Guide.pdf, topic 10.3.3. I did not have time to actually try it, and there is more information about why you should not use force user or force group.

1. Change your share definition so that it matches this pattern:
[finance]
path = /usr/data/finance
browseable = Yes
read only = No
2. Set consistent user and group permissions recursively down the directory tree as shown
here:
root# chown -R janetp.users /usr/data/finance
3. Set the files and directory permissions to be read/write for owner and group, and not
accessible to others (everyone) using the following command:
root# chmod ug+rwx,o-rwx /usr/data/finance
4. Set the SGID (super-group) bit on all directories from the top down. This means
all files can be created with the permissions of the group set on the directory. It
means all users who are members of the group finance can read and write all files in
the directory. The directory is not readable or writable by anyone who is not in the
finance group. Simply follow this example:
root# find /usr/data/finance -type d -exec chmod ug+s {}\;
5. Make sure all users that must have read/write access to the directory have finance
group membership as their primary group, for example, the group they belong to in
/etc/passwd.


Hope that helps
Duncan