cvs problems: some hints
[email protected] Fri, 5 Apr 2002 14:28:01 +0200
| Newsgroups | gmane.linux.suse.alice |
|---|---|
| Message-ID | <[email protected]> |
Hi everybody, i found something which maybe solves the cvs problems we discussed today. I am testing right know and will also give a short solution for this problem. Here is the first hint: CVS (Concurrent Version System) General Info on CVS and Good Tutorial Manual Reference is at http://www.gnu.org/manual/cvs/index.html Good tutorial at http://cvsbook.red-bean.com/ (look here first) Having problems with CVS and pserver ? Did you get something like this when you have your cvs root to be CVSROOT=:pserver:xxx.gatech.edu:/cvs/cvsroot ? The error message: cvs server: cannot open /root/.cvsignore: Permission denied cvs [server aborted]: can't chdir(/root): Permission denied Since the inetd entry recommended by the Cederquist manual is cvspserver stream tcp nowait root /usr/bin/cvs cvs --allow-root=/cvs/cvsroot For some reason when (running on Redhat 6.1) the command inherits the environment of root and the variable $HOME is set to /root, cvs tries to read $HOME/.cvsignore. What you really want is the system to read the environment of the user you are logging in as. In the C code for CVS it first checks for get_home_directory() and then checks for the users home only if get_home_directory() fails. i.e., $HOME should be unset when first executed so that get_home_directory() fails. So by changing your inetd.conf entry for CVS to be cvspserver stream tcp nowait root /usr/bin/env env -i /usr/local/bin/cvs -f --allow-root=/cvs/cvsroot pserver Essentially here you are not running cvs directly but calling the env command with the -i option and then the call to cvs. env executes programs. By specifying the -i entry you are saying the command to be executed (here it is /usr/local/bin/cvs) should not inherit an enviornment from anywhere. This may have side effects that I do not know of yet. If there are side effects I'll update this. SKK Jan 7 2000 and the second hint: cannot open /root/.cvsignore Brian Huddleston [email protected] Tue, 8 Feb 2000 17:03:41 -0600 Previous message: HELP: cannot open /root/.cvsignore Next message: sending client info to server (Was: "cvs ci -e editor" patch) Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] Yes, its a bug (IMHO). If you restart inetd from the command prompt it inherits your environmental variables. CVS gloms onto them and tries to read the defaults in the home directory of the user you started inetd as... You can either: a) Write a little wrapper script to unset HOME and then launch cvs, or b) Reboot the server. It doesn't have the problem if it gets started from init. Brian Huddleston Huddleston Consulting ----- Original Message ----- From: "Mario Moreira" <[email protected]> To: <[email protected]> Sent: Tuesday, February 08, 2000 10:49 AM Subject: HELP: cannot open /root/.cvsignore > Hi, > > I've just instaled cvs in a Linux RedHat 6.1 machine from the .rpm > package that came with RedHat(cvs 1.10.6). I've configured the cvs > server as this: > > [root@dunga cvs]# cvs -v > > Concurrent Versions System (CVS) 1.10.6 (client/server) > ... > > [root@dunga cvs]# tail /etc/inetd.conf | grep cvs > cvspserver stream tcp nowait root /usr/bin/cvs cvs -b /usr/bin > --allow-root=/usr/local/cvs pserver > > [root@dunga cvs]# grep cvs /etc/services > cvspserver 2401/tcp # CVS client/server operations > cvspserver 2401/udp # CVS client/server operations > > To initialise the repository, I did: > > $ export CVSROOT=/usr/local/cvs > $ cvs init > $ cd /usr/local/cvs > $ chgrp -R cvs . > $ /etc/rc.d/init.d/inet restart (to restart inetd) > > Then from other machine I've tried to do: > > [moreira@cavername testdir]$ echo $CVSROOT > :pserver:cvsadmin@dunga:/usr/local/cvs > [moreira@cavername testdir]$ cvs login > (Logging in to cvsadmin@dunga) > CVS password: > [moreira@cavername testdir]$ cvs co CVSROOT > cvs server: cannot open /root/.cvsignore: Permission denied > cvs [server aborted]: can't chdir(/root): Permission denied > > Why is this message? The cvsadmin can login into the machine (using > ssh), and it is in the cvs group. Why is the cvs trying to read the > /root ? Have I miss something? > > Please, reply directly to me as I'm not in this mailing list > ([email protected]). > Regards, > > -- > Mario Moreira See you later. Mit freundlichen Grüßen Tobias Mucke -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]