LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-18-2011, 03:20 AM   #1
jsaravana87
Member
 
Registered: Aug 2011
Location: Chennai,India
Distribution: Redhat,Centos,Ubuntu,Dedian
Posts: 558
Blog Entries: 5

Rep: Reputation: Disabled
How can i share cvs user home directory to all users of cvs


Hi
I had installed cvs server its works fine ..but i want to share cvs user home folder between all users..can someone help me out how can i share cvs users home folder........ i tried to connect cvs as root it delivering following error



Reason
could not connect toserver@192.168.1.5:/cvs:IOexecpetion error occurred
connection refused root not allowed

Thanks&Regards
arun

Last edited by jsaravana87; 10-18-2011 at 05:42 AM.
 
Old 10-18-2011, 07:56 AM   #2
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
OK, keep in mind that nobody would actually do any work in ${CVSROOT} -- that's a no-no.

Best way I've fond is to add a group, say, cvs or cvsusers or something similar then add that group to your CVS users; you could do that with
Code:
groupadd cvs
Then
Code:
usermod -G -a cvs userid
or simply edit /etc/group and add the user(s) to the cvs line (comma separated list, no spaces).

Then, get logged in as root (or use su - or sudo) and do something like this (I have the CVS repository in /usr/local/cvsroot, yours may vary):
Code:
cd /usr/local
chgrp -R cvs cvsroot
find cvsroot -type d -exec chmod 775 {} \;
That will give your CVS users permissions to write in the repository and the directories in the repository. If you wish to keep all other users out of ${CVSROOT}, simply
Code:
chmod 770 /usr/local/cvsroot
and that will do that.

Your CVS users will be able to create new directories, check out existing directories, check changes back in and all the other things they need to do. It's not necessary that they
Code:
newgrp cvs
to work with CVS but it might be nice to train them to do so, along with
Code:
newgrp
to return to their default group when through working with CVS (see the newgrp manual page).

Users are expected to work in their own home directory in, say, a subdirectory named src, checking out from the repository there. Never, ever, should they work in the repository itself.

Hope this helps some.

Last edited by tronayne; 10-18-2011 at 08:06 AM.
 
1 members found this post helpful.
Old 10-21-2011, 08:35 AM   #3
jsaravana87
Member
 
Registered: Aug 2011
Location: Chennai,India
Distribution: Redhat,Centos,Ubuntu,Dedian
Posts: 558

Original Poster
Blog Entries: 5

Rep: Reputation: Disabled
HI
till i could int solve the issue

I had configured my cvs server /var/cvs path in centos...whenever user access the /var/cvs creating a folder it delivers them error permission denied
[root@bmw ~]# su - saravana
[saravana@bmw ~]$ cd /var/cvs/
[saravana@bmw cvs]$ ls
cvs CVSROOT ecae ecaret subash
[saravana@bmw cvs]$ cd subash/
[saravana@bmw subash]$ ls
ecae ecare ecarew
[saravana@bmw subash]$ mkdir dd
mkdir: cannot create directory `dd': Permission denied
[saravana@bmw subash]$ cd ..
[saravana@bmw cvs]$ mkdir ecare
mkdir: cannot create directory `ecare': Permission denied
[saravana@bmw cvs]$ cd ..
[saravana@bmw var]$
[saravana@bmw var]$ cd
[saravana@bmw ~]$ su - root
Password:
[root@bmw ~]# cd /var/cvs/
[root@bmw cvs]# ls
cvs CVSROOT ecae ecaret subash
[root@bmw cvs]# mkdir ecare
[root@bmw cvs]# chmod -R 777 ecare
[saravana@bmw cvs]$ cd ecare
[saravana@bmw ecare]$ ls
[saravana@bmw ecare]$ mkdir ty
mkdir: cannot create directory `ty': Permission denied
[saravana@bmw ecare]$



each and every time when ever one user create a folder in /var/cvs its delivering error..
i how can i have allow user to just access /var/cvs path and they should have all permision susch as del,modify,creata folder in /var/cvs ..other than that i should int get any permission other than that

Last edited by jsaravana87; 10-21-2011 at 08:36 AM.
 
0 members found this post helpful.
Old 10-21-2011, 09:40 AM   #4
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
Did you make note of OK, keep in mind that nobody would actually do any work in ${CVSROOT} -- that's a no-no.? I really meant it -- no -- and that means, zero, nobody -- does anything whatsoever in /var/cvs.

What a user does is, in a subdirectory of their home directory filled with source code (only source code, no binaries; no .o's, no executables) issue
Code:
cvs import -m "initial installation" name_of_repository vendor release
Where "initial installation" can be any string you wish to use as a message; name_of_repository is the name for the group of files being imported into CVS, such as ty or ecare. The vendor and release tags are there to identify your vendor (if outside vendor is writing software for you) or release (version number -- it'll be 1.0 by default on import).

You do not create directories in ${CVSROOT} (/var/cvs in your case), cvs does that and manages all updates to any file in any repository directory (user check out a tree, change something, then check it back in using cvs). This is typical of all source code control systems.

You have two options: create a cvsusers group and add your users to that group or, if you don't care about any users being able to check out and modify anything, just use users, then
Code:
cd /var
chown -R root.cvsusers cvs                      < the safe way >
or
chown -R root.users cvs                         < the non safe way >
then
chmod 775 cvs                                   < so the group can write >
You really need to read the documentation -- get it at http://www.nongnu.org/cvs/.

By the way, did you do cvs init?

Read the blasted documentation and the manual page.

Last edited by tronayne; 10-21-2011 at 09:43 AM.
 
1 members found this post helpful.
Old 10-21-2011, 10:30 AM   #5
jsaravana87
Member
 
Registered: Aug 2011
Location: Chennai,India
Distribution: Redhat,Centos,Ubuntu,Dedian
Posts: 558

Original Poster
Blog Entries: 5

Rep: Reputation: Disabled
hI
i want my user to just access /var/cvs


[root@bmw ~]# useradd -d /var/cvs/ ashok
useradd: warning: the home directory already exists.
Not copying any file from skel directory into it.
[root@bmw ~]# useradd -d /var/cvs/ vijay
useradd: warning: the home directory already exists.
Not copying any file from skel directory into it.
[root@bmw ~]# setfacl -m u:ashok:rwx /var/cvs
[root@bmw ~]# setfacl -m u:vijay:rwx /var/cvs
[root@bmw ~]# groupadd permission
[root@bmw ~]# usermod -G permission ashok
[root@bmw ~]# usermod -G permission vijay
[root@bmw ~]# su - ashok
-bash-3.2$ cd /var/cvs/
-bash-3.2$ mkdir ashok
-bash-3.2$ cd ashok/
-bash-3.2$ ls
-bash-3.2$ touch ashok
-bash-3.2$
-bash-3.2$ logout
[root@bmw ~]# su - vijay
-bash-3.2$ cd /var/cvs/
-bash-3.2$ mkdir vijay
-bash-3.2$ cd vijay/
-bash-3.2$ touch vijay
-bash-3.2$ logout
[root@bmw ~]# su - vijay
-bash-3.2$ cd /var/cvs/
-bash-3.2$ ls
ashok cvs CVSROOT vijay
-bash-3.2$ rm -rf ashok/
rm: cannot remove `ashok//ashok': Permission denied
-bash-3.2$ logout

[root@bmw ~]# su - ashok
-bash-3.2$ cd /var/cvs/
-bash-3.2$ ls
ashok cvs CVSROOT vijay
-bash-3.2$ rm -rf vijay/
rm: cannot remove `vijay//vijay': Permission denied
-bash-3.2$ rm -rf vijay/

i added two user to a group but still one ashok could int del are modify the content made by vijay can someone say how can i get are modify other user conetnt

Thanks&Regards
arun
 
0 members found this post helpful.
Old 10-21-2011, 11:37 AM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by arun5002 View Post
hI
i want my user to just access /var/cvs

i added two user to a group but still one ashok could int del are modify the content made by vijay can someone say how can i get are modify other user conetnt
Apparently, you are not/have not read or understood the documentation. Re-read it, and try to pay attention to what it's telling you. Also, tronayne answered your questions in post #4, yet you didn't do or acknowledge ANYTHING in that post, and are amazed that it's not working.

Unless you follow the documentation, it won't work. Doesn't get much simpler than that.
 
Old 10-21-2011, 12:21 PM   #7
jsaravana87
Member
 
Registered: Aug 2011
Location: Chennai,India
Distribution: Redhat,Centos,Ubuntu,Dedian
Posts: 558

Original Poster
Blog Entries: 5

Rep: Reputation: Disabled
Hi,
i read the complete manual im tring to make my user to login to bash shell and just they need to be accessed /var/cvs to create and modify and del it..Finally i could int find out document how to make out how to chage ownership of


usermod -G root ashok
usermod -G root vijay

even then adding user to rot priviledge i could int get thing works
 
0 members found this post helpful.
Old 10-21-2011, 01:45 PM   #8
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by arun5002 View Post
Hi,
i read the complete manual im tring to make my user to login to bash shell and just they need to be accessed /var/cvs to create and modify and del it..Finally i could int find out document how to make out how to chage ownership of

usermod -G root ashok
usermod -G root vijay

even then adding user to rot priviledge i could int get thing works
Again, you are not reading/understanding the documentation. Did you not understand what tronayne said???
Quote:
Originally Posted by tronayne
You do not create directories in ${CVSROOT} (/var/cvs in your case), cvs does that and manages all updates to any file in any repository directory (user check out a tree, change something, then check it back in using cvs). This is typical of all source code control systems.
You use CVS to create users directories/groups WITHIN CVS. Their system-users have nothing to do with it.
 
Old 10-21-2011, 02:09 PM   #9
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
Let's see if we can back up a little here -- is there some reason that you do not want your users to have an account on that system -- where they log in either directly or with SSH and have a home directory?

Could it be that they are not "local" users -- as they are using their own computers within your facility or perhaps remotely?

If that is the case -- they would be accessing CVS via an intranet or the internet -- then we need to implement CVS as a server.

When CVS is implemented as a server, remote machines can access it, check out source code, edit that code locally and then check in the changes they have made.

What you are doing is not going to work; in fact, you are well on your way to making a real mess of your system and this would be a real good time to stop what you're doing before you accidentally do something that will make a real mess. Sorry if that's harsh, but it's the truth.

If your CVS users are remote from your system -- they access it via intranet or internet -- I can help you set up CVS as a network service. But please, stop doing what you're doing -- it is not going to work.
 
Old 10-22-2011, 05:56 AM   #10
jsaravana87
Member
 
Registered: Aug 2011
Location: Chennai,India
Distribution: Redhat,Centos,Ubuntu,Dedian
Posts: 558

Original Poster
Blog Entries: 5

Rep: Reputation: Disabled
How to add a group to root

Hi

useradd client
useradd client1
useradd client2
groupadd server
usermod -G server client1
usermod -G server client
usermod -G server client2

How can i add group server to root ...
 
Old 10-22-2011, 06:02 AM   #11
JSkywalker
Member
 
Registered: Aug 2007
Distribution: openSUSE
Posts: 102

Rep: Reputation: 24
Did you try:
Quote:
# man groupadd
 
Old 10-22-2011, 06:32 AM   #12
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,
Quote:
Originally Posted by arun5002 View Post
How can i add group server to root ...
I assume, after seeing you already added a group called server, that you want to give the root user access to this specific group.

Why do you want to do that? root is all powerful and thus has already access to all groups. root doesn't need to be added to any other group.

Hope this helps.

Last edited by druuna; 10-22-2011 at 06:47 AM. Reason: Fixed weird sentence
 
1 members found this post helpful.
Old 10-22-2011, 07:08 AM   #13
jsaravana87
Member
 
Registered: Aug 2011
Location: Chennai,India
Distribution: Redhat,Centos,Ubuntu,Dedian
Posts: 558

Original Poster
Blog Entries: 5

Rep: Reputation: Disabled
[root@localhost ~]# setfacl -m u:dhinesh:rwx /var/cvs/CVSROOT/
[root@localhost ~]# setfacl -m u:dhinesh:rwx /var/cvs/
[root@localhost ~]# setfacl -m u:dhinesh:rwx /var/
[root@localhost ~]# setfacl -m u:rajalakshmi:rwx /var/cvs/CVSROOT/
[root@localhost ~]# setfacl -m u:rajalakshmi:rwx /var/cvs/
[root@localhost ~]# setfacl -m u:rajalakshmi:rwx /var/
[root@localhost ~]# groupadd last
[root@localhost ~]# usermod -G last rajalakshmi
[root@localhost ~]# usermod -G last dhinesh
[root@localhost ~]# setfacl -m g:last:rwx /var/cvs/CVSROOT/
[root@localhost ~]# setfacl -m g:last:rwx /var/cvs/
[root@localhost ~]# setfacl -m g:last:rwx /var/
[root@localhost ~]# chown dhinesh:root /var/cvs/CVSROOT/
[root@localhost ~]# chown rajalakshmi:root /var/cvs/CVSROOT/
[root@localhost ~]# su - dhinesh
[dhinesh@localhost ~]$ cd /var/cvs/CVSROOT/
[dhinesh@localhost CVSROOT]$ ls
1 commitinfo config,v ecare Emptydir indian modules notify,v rcsinfo,v verifymsg
checkoutlist commitinfo,v cvswrappers editinfo harish loginfo modules,v rajalakshmi taginfo,v verifymsg,v
checkoutlist,v config cvswrappers,v editinfo,v history loginfo,v notify rcsinfo val-tags
[dhinesh@localhost CVSROOT]$ mkdir dhinesh
[dhinesh@localhost CVSROOT]$ touch dhinesh
[dhinesh@localhost CVSROOT]$ vi dhinesh/
[dhinesh@localhost CVSROOT]$ cd
[dhinesh@localhost ~]$
[dhinesh@localhost ~]$ vi rajalaskkhmi file it not saving off
can som one tell how can give permission for dhinesh created file cn be modify and del by rajalakshmi user..
 
Old 10-22-2011, 07:13 AM   #14
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
An off-topic comment if I may..

Quote:
Originally Posted by JSkywalker View Post
Did you try:
As Druuna indicated there are some questions that should not be blithely answered and there are some LQ members that deserve more attention than just answering questions. Unless you don't understand the power of root yourself, that is. In this particular case the member (check previous threads) has repeatedly displayed poor communication skills and vestigial admin knowledge leading to him trying to do the right thing the wrong way more than a few times. Please keep that in mind.
 
Old 10-22-2011, 07:22 AM   #15
jsaravana87
Member
 
Registered: Aug 2011
Location: Chennai,India
Distribution: Redhat,Centos,Ubuntu,Dedian
Posts: 558

Original Poster
Blog Entries: 5

Rep: Reputation: Disabled
Hi
i could int findout the command that all user in the group could access /var/cvs/cvsroot have full permission to del modfy other user content it never happens to me ..that y the reason i tried to make my user to act as root .
 
  


Reply



Posting 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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can Users share a home directory? Thomas Theimer Linux - Newbie 5 05-03-2008 02:32 PM
cvs repository cvs-1.11.21.tar.gz installation problem on redhat 5 linux version ajaytiwary Linux - Newbie 1 09-30-2007 12:58 PM
Running CVS Server on Fedora Core 4 with pserver as "cvs" user rupak Fedora 2 09-17-2005 02:06 PM
Running CVS Server with pserver as "cvs" user on Fedora Core 4 rupak Linux - Software 2 09-17-2005 12:10 PM
CVS: Can I restrict the "cvs remove" to specific users? CaptainRandom Linux - Software 4 01-13-2005 03:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration