[Techtalk] cvs permissions

Conor Daly c.daly at met.ie
Tue May 18 11:31:39 EST 2004


On Mon, May 17, 2004 at 08:41:15PM -0700 or thereabouts, nicole wrote:
> 
> At 23:08 on May 17, Conor Daly shook the earth with:
> >
> > I can get around that by making parallel repositories for 'devel' and
> > 'doc' but that isn't elegant or extensible.  Is there something I'm
> > missing?  A different authentication method?
> 
> I'm no CVS genius, let alone inheriting file permissions genius, but what
> would prevent you from having a subdirectory sgid another gid?
> 
> For example:
> 
> Repository: devel
> 
> /var/cvs/devel/ sgid devel
> /var/cvs/devel/docs/ sgid docs
> /var/cvs/devel/src/ sgid src

Can you do 'cvs co docs/foo' to checkout module 'foo' and avoid having to
maintain CVSROOT/modules?  OK, tried that.  You can 'cvs co docs/foo' but
you can also do 'cvs co docs' as a module of its own.  I don't want that to
be available.  Back to 'Essential CVS' for that...
 
> In your CVSROOT/modules, you could have something like:
> 
> devel devel
> docs devel/docs&
> src devel/src&
> 
> If people just wanted to check out "docs" or "src" instead of the whole
> "devel" tree.

This requires CVSROOT/modules to be maintained by hand doesn't it?  What
happens when someone does a 'cvs import' of a new module?  I suppose I could
create scripts to automatically divert imports based on one of the tags in
the commandline.  That could create the relevant subdirs and update
CVSROOT/modules.  Then I have to cope with the same module name being
applied to a 'devel' module and a 'doc' module and safely reject such
things...
 
> I don't know if the subdir sgid groups thing will work... I haven't tried

I'll poke at it, could be interesting...

OK, did that, it works.

ra% ls -l
total 36
drwxrwxr-x   3 dba      other       1024 May 17 10:06 CVSROOT
drwxrwsr-x   4 dba      staff        512 May 18 11:05 cdtemp

ra% ls -l cdtemp
total 4
drwxrwsr-x   3 dba      other        512 May 18 11:07 test
drwxrwsr-x   2 dba      staff        512 May 18 11:05 testcd

ra% ls -l cdtemp/test
total 4
-r--r--r--   1 dba      other        381 May 18 10:56 test,v
drwxrwsr-x   2 dba      other        512 May 18 11:07 testdba

ra% ls -l cdtemp/testcd
total 2
-r--r--r--   1 dba      staff        379 May 18 11:05 test,v

'cdtemp' is group 'staff' and SGID.
'test' is group 'other' under 'cdtemp' and is SGID
'testdba' is under 'test' and is group 'other'
'testcd' is group 'staff' under 'cdtemp'

Conor
-- 
Conor Daly,                   Please avoid sending me 
Met Eireann, Glasnevin Hill,  Word or PowerPoint attachments.
Dublin 9, Ireland             http://www.fsf.org/philosophy/no-word-attachments.html
Ph +3531 8064276 Fax +3531 8064247


**********************************************************************
This e-mail and any files transmitted with it are confidential 
and intended solely for the addressee. If you have received
this email in error please notify the sender.
This e-mail message has also been scanned for the
presence of computer viruses.
**********************************************************************



More information about the Techtalk mailing list