Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > CVS Problems

CVS Problems
Thread Tools
Fresh-Faced Recruit
Join Date: Mar 2001
Location: Plymouth, MI 48170
Status: Offline
Reply With Quote
Aug 17, 2001, 03:22 PM
 
I am trying to get the cvs pserver working correctly. I added the service in NetInfo (cvspserver, port 2401, tcp), and added the pserver line in /etc/inetd.conf.

I can connect from another machine and login, checkout, etc just fine. However, if another user logs in, when they try to checkout, the cvs server returns with an error message:

cvs server: cannot open /var/root/.cvsignore: Permission denied
cvs [server aborted]: can't chdir(/var/root): Permission denied

In the docs at cvshome.org, this error only says that I must not have included the '-f' open in /etc/inetd.conf, but what I have is this:

cvspserver stream tcp nowait root /usr/bin/cvs cvs -f --allow-
root=/usr/local/cvsrepos pserver

Any ideas?
     
Dedicated MacNNer
Join Date: Apr 2001
Location: San Francisco, USA
Status: Offline
Reply With Quote
Aug 17, 2001, 10:56 PM
 
Google pointed me in this direction: http://osxtalk.com/articles/01/01/29/1547207.shtml
     
TimMcG  (op)
Fresh-Faced Recruit
Join Date: Mar 2001
Location: Plymouth, MI 48170
Status: Offline
Reply With Quote
Aug 18, 2001, 08:04 AM
 
I tried searching every board I could find, and the major search engines like Google.

That thread and the linked directions do not solve my problem.

I have the cvs server working, but only for a single user (me).

The cvs docs point to the '"-f" option mission from the /etc/inetd.conf file, but I did include this. The "-f" option is supposed to skip looking for the .cvsignore file in the users home directory. Since cvs server is being run as root, it wants to look in /var/root for .cvsignore, but does not have permission to do so.

Has anyone gotten the server to work with a group of developers?
     
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Aug 18, 2001, 08:15 AM
 
Did you create an entry in the netinfo database for this service?

Wait, looks like you did.

Please explain where your CVSROOT is, who created it, how are you doing the checkouts, etc etc
     
TimMcG  (op)
Fresh-Faced Recruit
Join Date: Mar 2001
Location: Plymouth, MI 48170
Status: Offline
Reply With Quote
Aug 18, 2001, 02:22 PM
 
CVSROOT is set to /usr/local/cvsrepos
created by root, permissions then changed to:
owner: tmcguire:staff group:read/write

I created a non-admin user named: cvsuser.

I then added /usr/local/cvsrepos/CVSROOT/passwd with cvs user names, passwords, and the system user name:
bob:[password]:cvsuser
joe:[password]:cvsuser
tmcguire:[password]

When I connect as myself using
cvs -d server:tmcguire@192.168.1.50:/usr/local/cvsrepos login
I can then checkout using
cvs -d server:tmcguire@192.168.1.50:/usr/local/cvsrepos checkout project1

However, if I connect as bob using
cvs -d server:bob@192.168.1.50:/usr/local/cvsrepos login
I can login just fine, but when I checkout I get the error messages posted previously.

If I change cvsuser to be an admin user, all works fine.

What I do not get is that the -f option is supposed to prevent the cvs server from looking for .cvsignore in the user's home directory. Since the pserver process is run as root, it is trying to look at /var/root for this file. So the option is not working. Also, if the process is run as root, why could it not read /var/root anyway?

Also, leaving cvsuser as an admin user is not an option for obvious reasons.
     
TimMcG  (op)
Fresh-Faced Recruit
Join Date: Mar 2001
Location: Plymouth, MI 48170
Status: Offline
Reply With Quote
Aug 18, 2001, 02:27 PM
 
I forgot to turn off the "Smilies" in the prior post.

It turned the pattern into them

it should have said:
cvs -d server:...

Sorry
     
Fresh-Faced Recruit
Join Date: Aug 2001
Status: Offline
Reply With Quote
Aug 19, 2001, 05:36 AM
 
what abour creating the .cvsignore file ?
touch /var/root/.cvsignore and try to see if it works better.
Oh, check the permissions to be r-x on /var/root

you can also try to login as cvsuser and see if you have access to both /var/root and the cvs rep itself from the terminal
     
TimMcG  (op)
Fresh-Faced Recruit
Join Date: Mar 2001
Location: Plymouth, MI 48170
Status: Offline
Reply With Quote
Aug 20, 2001, 09:35 AM
 
I tried that, and it did not make any difference.

What I did for now is change the 'cvsuser' to an admin user, then in NetInfo, I changed the home directory to /dev/null and the password to * so that user cannot log into my server.

The cvs pserver is using the correct user names, and using the cvsuser system name.
     
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Aug 20, 2001, 02:05 PM
 
Originally posted by TimMcG:
<STRONG>What I did for now is change the 'cvsuser' to an admin user, then in NetInfo, I changed the home directory to /dev/null and the password to * so that user cannot log into my server.</STRONG>
Also set its shell to /dev/null, just to be on the safe side
     
Dedicated MacNNer
Join Date: Jan 2001
Location: Virginia, US
Status: Offline
Reply With Quote
Aug 24, 2001, 02:53 AM
 
You said you made the repository group read/write by the group "staff", but bob is not a member of that group. Your user owns the repository directory, so that user has write permissions on it, but the "bob" user has none. You could possibly add "cvsuser" to the "staff" group, if in fact that is the machine user they're actually running as.

Basically, you need write permission on the repository for stuff to work. If I have a bunch of real users on the machine, I typically create a Unix group for the project, add all the users to the group, and make the repository have that group and have read/write permissions for that group (at least all the directories; that's really what's needed).

In your case, if the pserver itself is soing to be running as the "cvsuser" user, then you could change the ownership of the repository to that user instead of yourself.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 11:26 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2