LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Ownership of new Files in SAMBA (https://www.linuxquestions.org/questions/linux-software-2/ownership-of-new-files-in-samba-44222/)

ghight 02-05-2003 03:51 PM

Ownership of new Files in SAMBA
 
Below is my smb.conf file made with Webmin on RH 8.0. I am having an issue where files that are created on the SAMBA server have different group ownerships. Some have user.group ownership of "ghight.ghight" and others have "ghight.smbadmin". I am a member of both groups. Why does it seems to randomly pick group ownership for my files? All of these are created from a Win98 workstation so me changing groups isn't an issue.

Any thoughts would be helpful and appreciated.

PS-What you see is what you get. Nothing has been deleted or changed in the conf file.

____________________________________________

[global]
log file = /var/log/samba/%m.log
dns proxy = no
smb passwd file = /etc/samba/smbpasswd
server string = Job Archives
obey pam restrictions = yes
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
workgroup = 3IENG
hosts allow = 192.168.1. 127.
encrypt passwords = yes
security = user
max log size = 0

[Archives]
preserve case = yes
write list = ghight,nzimmer,troedel,bzimmer,@smbadmin
path = /home/archives
comment = Archive of completed job files
create mode = 775
directory mode = 775

[Submit]
comment = Modified files should be submitted here
writeable = yes
create mode = 775
path = /home/submit
directory mode = 775

Noerr 02-06-2003 04:16 AM

check your folder permissions (owner) (ls -al)
Are you using ACL's

ghight 02-06-2003 07:07 AM

No ACL's, just the regular file mode permissions and SAMBA write lists.

The folders are the same way, sometimes they randomly have different groups. On the smb.conf you can see that "nzimmer" is also in the write list. The same thing happens to him too.

I can't seem to find a pattern to any of this.

jharris 02-06-2003 07:16 AM

Quote:

From smb.conf man page
force group (S)
This specifies a UNIX group name that will be assigned as the default primary group for all users connecting to this service.
This is useful for sharing files by ensuring that all access to files on service will use the named group for their permissions
checking. Thus, by assigning permissions for this group to the files and directories within this service the Samba administrator
can restrict or allow sharing of these files.

In Samba 2.0.5 and above this parameter has extended functionality in the following way. If the group name listed here has a '+'
character prepended to it then the current user accessing the share only has the primary group default assigned to this group if
they are already assigned as a member of that group. This allows an administrator to decide that only users who are already in a
particular group will create files with group ownership set to that group. This gives a finer granularity of ownership assign-
ment. For example, the setting force group = +sys means that only users who are already in group sys will have their default
primary group assigned to sys when accessing this Samba share. All other users will retain their ordinary primary group.

If the force user parameter is also set the group specified in force group will override the primary group set in force user.

See also force user.

Default: no forced group

Example: force group = agroup

I don't know wether using %G will work but it might be worth a go, so
Code:

force group = %G
would force the group to always be the *primary* group of the user who is connected to the share.

HTH

Jamie...

ghight 02-06-2003 07:33 AM

Quote:

Originally posted by jharris
For example, the setting force group = +sys means that only users who are already in group sys will have their default primary group assigned to sys when accessing this Samba share.
So maybe
Code:

force group = +smbadmin
would make everyone in the smbadmin group use those right instead of the regular primary group? This is still a question, I'm not real sure.

ps-Thanks for the post. I honestly didn't get that far into the man page.

jharris 02-06-2003 09:33 AM

Give it a go and see what happens. I sounds like it should work...

cheers

Jamie...

ghight 02-06-2003 10:40 AM

It worked! That's a great tip. I can't believe I've never seem that before.

Thanks again.:D


All times are GMT -5. The time now is 01:26 AM.