info-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Authorization failed when trying to do an import


From: Neil Aggarwal
Subject: Authorization failed when trying to do an import
Date: Sun, 27 Jan 2002 10:17:56 -0600

Olav:

I started over and now I am getting a different error message.

Here is what I did:
cvs -d /usr/local/cvsroot init
/usr/sbin/useradd cvs
cd /usr/local/cvsroot
chown -R cvs.cvs .
chmod ug+rwx . CVSROOT

vi /etc/xinetd.d/cvs and added these lines:
service cvs
{
        port = 2401
        socket_type = stream
        protocol = tcp
        user = cvs
        group = cvs
        server = /usr/bin/cvs
        server_args = --allow-root=/usr/local/cvsroot pserver
        type = UNLISTED
        wait = no
}

Restart xinetd:
/etc/init.d/xinetd restart

vi /usr/local/cvsroot/CVSROOT/passwd
Added a line with my user name and password:
neil:[password]

Where the password is copied from /etc/shadow

Make sure the cvs user is a member of the cvs group:
/usr/bin/gpasswd -a cvs cvs

Also, added myself to the cvs group:
/usr/bin/gpasswd -a neil cvs

I went to test it by logging in as myself (in another shell) and typing:
cvs -d :pserver:address@hidden:/usr/local/cvsroot login
It asked for me password and reported no errors, so I assume the login
was OK.

I then went to import a new project by typing:
cvs -d :pserver:address@hidden:/usr/local/cvsroot import -m "Test" test JAMM
start
setgid failed: Operation not permitted
cvs import: authorization failed: server localhost rejected access to
/usr/local/cvsroot for user neil

I dont understand this.  If I look in the /etc/groups file, I see:
cvs:x:511:neil,cvs

If I go to /usr/local/cvsroot, the permissions are:
# pwd
/usr/local/cvsroot
# ls -la
total 12
drwxrwxr-x    3 cvs      cvs          4096 Jan 27 09:59 .
drwxr-xr-x   29 root     root         4096 Jan 27 09:53 ..
drwxrwxr-x    3 cvs      cvs          4096 Jan 27 09:56 CVSROOT

Any ideas??

Thanks,
        Neil.

--
Neil Aggarwal
JAMM Consulting, Inc.    (972) 612-6056, http://www.JAMMConsulting.com
Custom Internet Development    Websites, Ecommerce, Java, databases

> -----Original Message-----
> From: Olav Lindkjolen [mailto:address@hidden
> Sent: Saturday, January 26, 2002 7:10 PM
> To: Neil Aggarwal
> Cc: CVS-II Discussion Mailing List
> Subject: Re: CVS pserver on RedHat 7.1 lets me login, but when I do
> import, it fails
>
>
> Something to do with cvs server running as root, inheriting the HOME
> environment variable. Create a user named "cvs" and run the server under
> that user. Or try this as root:
>
> unset HOME
> /etc/rc.d/init.d/inet restart
>
> Regards from Olav!
>
> Neil Aggarwal wrote:
>
> > I am trying to set-up a CVS pserver on my RedHat 7.1
> development machine.
> > I tried reading the CVS book at http://cvsbook.red-bean.com, but it
> > does not cover xinetd, so I tried to adapt it myself.
> >
> > Here is what I did as root:
> > cvs -d /usr/local/cvsroot init
> > /usr/sbin/useradd cvs
> > cd /usr/local/cvsroot
> > chgrp -R cvs .
> > chmod ug+rwx . CVSROOT
> >
> > vi /etc/xinetd.d/cvs and added these lines:
> > service cvs
> > {
> >         port = 2401
> >         socket_type = stream
> >         protocol = tcp
> >         user = root
> >         group = cvs
> >         server = /usr/bin/cvs
> >         server_args = --allow-root=/usr/local/cvsroot pserver
> >         type = UNLISTED
> >         wait = no
> > }
> >
> > Restarted xinetd:
> > /etc/init.d/xinetd restart
> >
> > vi /usr/local/cvsroot/CVSROOT/passwd
> > Added my login and password copied from from /etc/shadow
> >
> > I then tried to test it by going to a shell with my user account.
> >
> > I typed:
> > cvs -d :pserver:address@hidden:/usr/local/cvsroot login
> > It asked me for my password and reported no errors, so I thought that
> > everything should be OK.
> >
> > Next, I tried to import a new project, so I went to the
> > directory containing the project and typed:
> > cvs -d :pserver:address@hidden:/usr/local/cvsroot import -m
> "Test Project"
> > testProject neil start
> >
> > I got these error messages:
> > cvs server: cannot open /root/.cvsignore: Permission denied
> > cvs server: cannot make path to /usr/local/cvsroot/testProject:
> Permission
> > denied
> > cvs server: Importing /usr/local/cvsroot/testProject/src
> > cvs server: ERROR: cannot mkdir
> /usr/local/cvsroot/testProject/src -- not
> > added: No such file or directory
> >
> > No conflicts created by this import
> >
> > Any ideas why this is occurring?
> >
> > Thanks,
> >     Neil.
> >
> > --
> > Neil Aggarwal
> > JAMM Consulting, Inc.    (972) 612-6056, http://www.JAMMConsulting.com
> > Custom Internet Development    Websites, Ecommerce, Java, databases
> >
> >
> > _______________________________________________
> > Info-cvs mailing list
> > address@hidden
> > http://mail.gnu.org/mailman/listinfo/info-cvs
> >
> >
> >
> >
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]