Computing.Net > Forums > Linux > Linux/Samba File Permissions

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Linux/Samba File Permissions

Reply to Message Icon

Name: Derek
Date: September 7, 2001 at 13:34:00 Pacific
Comment:

Hi,

I have a Mandrake 8.0 box running Samba 2.2.0 with several samba shares that can only be accessed by specific groups. For example - the accounting share can only be accessed by members of the accounting group.

My problem is that whenever a user copies a file into a share, (from a Win98 client), the file is given the ownership:group of the individual user - thus locking out all of the other members of the group from accessing the file. I want all of the files in the accounting share, (for example), to maintain the permissions of the accounting group. How is this done?

snip from smb.conf

[accounting]
path = /data/accounting
valid users = @accountants
comment = Accounting Dir
public = no
read only = no
writable = yes
inherit permissions = yes
create mode = 770
force create mode = 770
directory mode = 770
force directory mode = 770
group = @accountants
force group = @accountants



Sponsored Link
Ads by Google

Response Number 1
Name: DMR
Date: September 7, 2001 at 20:45:49 Pacific
Reply:

Try setting the SGID bit for your share. For example, if you want the normal (user,group,all) permissions to be 770, do:

chmod 2770 /data/accounting

The "2" sets the SGID bit, which should force all files that get placed/created in /data/accounting to be owned by the accounting group, not the group to which the creator of the file belongs.


0

Response Number 2
Name: DMR
Date: September 7, 2001 at 21:14:47 Pacific
Reply:

Just as a follow-up:

The above assumes, of course, that the UNIX group ownership of the /data/accounting directory has been set to the accounting group using the "chown" command.


0

Response Number 3
Name: Derek
Date: September 8, 2001 at 00:36:19 Pacific
Reply:

That did it...

Many thanks!!!


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


Defrag.and Cleanup of Tem... X Server recompile !



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Linux Forum Home


Sponsored links

Ads by Google


Results for: Linux/Samba File Permissions

samba share permissions www.computing.net/answers/linux/samba-share-permissions/20301.html

Samba File Permission www.computing.net/answers/linux/samba-file-permission/27361.html

Samba File Coping Issues www.computing.net/answers/linux/samba-file-coping-issues/5270.html