Hello All, Got a little problem that I'm hoping somebody can help me solve. I've got a samba server set as the office's file server. We have a large common share that different people put documents in, and are to be modified by other people. I need to setup samba so that when a new file is created it is writeable to the entire group, not just the person who created it. Here is any example. Current: drwxr-xr-x 7 hhaynes hhaynes foobar.txt What I need drwxrwxr-x hhaynes hr (or whatever the group owning the directory is) If anybody can point me in the right direction it would be most helpful. Thanks. Philip Bubel philip@bubel.com
>>I need to setup samba so that when a new file is created it >>is writeable to the entire group, not just the person who created itTry this...in your smb.conf create mode = 0665 I'm very bad with octet permissions.. 0665 would be I think something like drwxrwxr-x Cheers, .^. Mun Heng, Ow /V\ H/M Engineering /( )\ Western Digital M'sia ^^-^^ DID : 03-7870 5168 The Linux Advocate -----Original Message----- From: Philip Bubel [mailto:philip@bubel.com] Sent: Thursday, October 30, 2003 6:18 AM To: samba@lists.samba.org Subject: [Samba] File Permission Question Hello All, Got a little problem that I'm hoping somebody can help me solve. I've got a samba server set as the office's file server. We have a large common share that different people put documents in, and are to be modified by other people. I need to setup samba so that when a new file is created it is writeable to the entire group, not just the person who created it. Here is any example. Current: drwxr-xr-x 7 hhaynes hhaynes foobar.txt What I need drwxrwxr-x hhaynes hr (or whatever the group owning the directory is) If anybody can point me in the right direction it would be most helpful. Thanks. Philip Bubel philip@bubel.com -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
> Got a little problem that I'm hoping somebody can help me solve. I've > got a samba server set as the office's file server. We have a large common > share that different people put documents in, and are to be modified by > other people. I need to setup samba so that when a new file is created it > is writeable to the entire group, not just the person who created it. Here > is any example.Well. You can use setgid for that. In case you don't know what it is, i'd explain that. Directory: /export/share/secret Owner: foobar Group: hhaynes Now you set to the directory chmod 2770 /export/share/secret, this means the directory has now the setgid flag. This means, that all new files created in this directory will be owned by the group hhaynes. The same thing with setuid, except that the owner will be the current user of the setuid directory. I hope it's easy to understand. Of course you can set both flags (setuid, setgid) on a directory. Regards -- (O O) --oooO--(_)--Oooo---------------------------------------------------- Istvan Sebestyen <istvan@chains.ch> --------------------------------------------------------------------- What's the difference between chattr and chmod? man chattr > 1; man chmod > 2; diff -u 1 2 | less
"Philip Bubel" <philip@bubel.com> wrote in message news:!~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAAs1bqdKJzmkiB4lFfUBZJD8KAAAAQAAAAC+mRorIWu0Kc/TrUs29tLAEAAAAA@bubel.com...> Hello All, > Got a little problem that I'm hoping somebody can help me solve. I've > got a samba server set as the office's file server. We have a largecommon> share that different people put documents in, and are to be modified by > other people. I need to setup samba so that when a new file is created it > is writeable to the entire group, not just the person who created it.I use Linux file permissions for this. I do the following on Red Hat. You will need to find the commands for your distro. create a new group "groupadd consultants" add all the relevant users to the group "usermod -G consultants pbubel" Give the group ownership of the share "chown pbubel:consultants /path/to/share I use the same approach to grant access to specific shares in Windows.
>>I need the group to be set to the group that has permission to the >>share, so that other users can edit my files.Try using force group. <snip from man smb.conf> 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 administraaEUR? tor can restrict or allow sharing of these files. In Samba 2.0.5 and above this parameter has extended functionalaEUR? ity in the following way. If the group name listed here has a aEUR(tm)+aEUR(tm) 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 ownaEUR? ership set to that group. This gives a finer granularity of ownaEUR? ership assignment. 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. </snip> Cheers, .^. Mun Heng, Ow /V\ H/M Engineering /( )\ Western Digital M'sia ^^-^^ DID : 03-7870 5168 The Linux Advocate