LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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

Reply
 
Search this Thread
Old 02-05-2003, 03:51 PM   #1
ghight
Member
 
Registered: Jan 2003
Location: Indiana
Distribution: Centos, RedHat Enterprise, Slackware
Posts: 524

Rep: Reputation: 30
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
 
Old 02-06-2003, 04:16 AM   #2
Noerr
Member
 
Registered: May 2002
Location: Dalec, HU
Distribution: Redhat 7.3
Posts: 696

Rep: Reputation: 30
check your folder permissions (owner) (ls -al)
Are you using ACL's
 
Old 02-06-2003, 07:07 AM   #3
ghight
Member
 
Registered: Jan 2003
Location: Indiana
Distribution: Centos, RedHat Enterprise, Slackware
Posts: 524

Original Poster
Rep: Reputation: 30
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.
 
Old 02-06-2003, 07:16 AM   #4
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 46
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...
 
Old 02-06-2003, 07:33 AM   #5
ghight
Member
 
Registered: Jan 2003
Location: Indiana
Distribution: Centos, RedHat Enterprise, Slackware
Posts: 524

Original Poster
Rep: Reputation: 30
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.
 
Old 02-06-2003, 09:33 AM   #6
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 46
Give it a go and see what happens. I sounds like it should work...

cheers

Jamie...
 
Old 02-06-2003, 10:40 AM   #7
ghight
Member
 
Registered: Jan 2003
Location: Indiana
Distribution: Centos, RedHat Enterprise, Slackware
Posts: 524

Original Poster
Rep: Reputation: 30
Talking

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

Thanks again.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
changing permissions and ownership on many files and folders Cinematography Linux - General 4 08-01-2005 03:20 AM
Keeping ownership of files rtcary Linux - Newbie 2 07-17-2005 04:14 PM
sudo: How can i change the ownership of particular files? anoopp Linux - Security 1 03-18-2005 02:03 AM
Samba changes file ownership hansen Linux - Networking 4 12-01-2003 12:03 AM
ownership of files changed after upgrade Tinkster Slackware 1 12-20-2002 07:34 PM


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

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration