[Bassetlug mailing] unison issues SGID?

Mark Pengelly - online markshop at pengelly.info
Wed Jul 9 22:12:26 BST 2008


OK working this out I think:

markp at markp-study-home:/markp/accounts$ ls -l
total 28
drwxr-xr-x 3 markp users 4096 2008-07-09 20:30 directoryname

markp at markp-study-home:/markp/accounts$ sudo chmod -v g+s directoryname
[sudo] password for markp: 
mode of `directoryname' changed to 2755 (rwxr-sr-x)

this works.

Next Question is:

will setting the SGID on the directories on one side of the sync root
adversely affect the directory properties on the other root (ie the ones
accessed as samba shares), where I guess samba is controlling this using
the create mask. I'll hold off til i know!

markp




On Wed, 2008-07-09 at 09:09 +0100, Mark Pengelly - online wrote:
> hmm, any thought on this one anyone?
> 
> I've replicated all my users and groups on my second linux server and I
> now sync all my files using unison, c/w correct user and group
> ownerships on the servers at either end of the sync. 
> 
> I've noticed that when i create a new file on the second server, it's
> not inheriting the correct group ownership (ie that of the share it's
> within) rather it makes the file the same as my username (my default
> group perhaps?), if i sync, that my file won't be readable by other
> members of the group that own that share at the other end...
> 
> how do I get the file to inherit the correct group ownership? 
> 
> is this it:?
> 
> Setting the SGID attribute on a directory : chmod g+s
> If the SGID (Set Group Identification) attribute is set on a directory,
> files created in that directory inherit its group ownership. If the SGID
> is not set the file's group ownership corresponds to the user's default
> group. 
> 
> 
> 
> 
> markp
> 
> 
> _______________________________________________
> Bassetlug mailing list
> Bassetlug at mailman.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/bassetlug
> 




More information about the Bassetlug mailing list