Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.