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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
12-31-2007, 06:50 AM
|
#1
|
|
Member
Registered: Nov 2006
Posts: 86
Rep:
|
CVS module (in repository) user:group - what is the correct approach?
I have setup a CVS pserver which works nicely for me, the user who first created the modules (subdirectories under /cvs).
The problem is when other users try to check out from that module (subdirectory under /cvs).
/cvs and /cvs/CVSROOT all belong to special 'user:group' that I created: 'cvs:cvs'.
Code:
drwxrwxr-x 3 cvs cvs 4096 2007-12-30 13:25 CVSROOT
-rw-rw-r-- 1 cvs cvs 0 2007-12-29 10:34 locks
drwxrwxr-x 8 xpnewbie xpnewbie 4096 2007-12-30 06:53 mymodule
As you can see, when I first created 'mymodule' (using import/commit), it was created with the ownership of xpnewbie:xpnewbie, not xpnewbie:cvs as I had hoped.
My question is: What is the right approach to tackle this problem?
Of course I could perform a 'chown -R xpnewbie:cvs mymodule' but then: - I don't know what would happen to a newly added file to the module (it would most certainly not receive 'xpnewbie:cvs' ownership.
- I will have to repeat this (manual) procedure every time I create a new module.
Is there a way to tell CVS/pserver to automatically assign the group 'cvs' to any newly checked in module/file?
Thanks,
Alex
|
|
|
|
01-01-2008, 04:41 PM
|
#2
|
|
Senior Member
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 13.37
Posts: 4,089
Rep: 
|
There are a couple of ways to approach this. The first is to put all CVS users into a cvs group, run chgrp cvs over the modules and then set the gid bit on all of the module directories:
Code:
find /path/to/cvsrepo/module -type d -exec chmod g+sw {} \;
That way all cvs group members will have write permission and all new files will belong to the cvs group.
The second way is to have a single cvs user and add your repository users added to CVSROOT/passwd. The cvs user owns the modules and the problem of multiple system users owning the files goes away.
|
|
|
|
01-01-2008, 06:38 PM
|
#3
|
|
Member
Registered: Nov 2006
Posts: 86
Original Poster
Rep:
|
Thank you very much, gilead.
I like the first way better, because it allows keeping track of who performed what in the CVS repositories.
However, it also means that every time a new repository is added, I will have to perform that 'chgrp cvs' and 'chmod g+sw'...
Is there a way to avoid that? Can I just do 'chmod g+sw' on /cvs, thus assuming from now on that every newly created repository (via cvs command, of course) will automatically receive g+sw as well?
Also, do I understand correctly that the 's' in the g+sw, simply makes every newly created directory/file belong to the cvs group?
Thanks,
Alex
|
|
|
|
01-01-2008, 10:12 PM
|
#4
|
|
Senior Member
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 13.37
Posts: 4,089
Rep: 
|
Yes, to both... You can run chmod g+sw on the top level directory so that you don't need to run it on each new module. The 's' does cause each new directory/file to belong to the cvs group.
|
|
|
|
01-03-2008, 09:00 AM
|
#5
|
|
Member
Registered: Nov 2006
Posts: 86
Original Poster
Rep:
|
Gilead, thanks again. This clarifies the issue.
For future reference, I am posting here a link that, although refers to ssh clients (vs. pserver), provides additional clues for finer granularity when needing to control access to CVS repositories:
http://ioctl.org/unix/cvs/server
What a great community!
Cheers,
Alex
|
|
|
|
01-03-2008, 01:28 PM
|
#6
|
|
Senior Member
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 13.37
Posts: 4,089
Rep: 
|
No problem - glad it helped. Thank you for posting the link 
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 05:44 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|