LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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

Reply
 
Search this Thread
Old 05-07-2005, 05:45 PM   #1
cwolf78
Member
 
Registered: Apr 2005
Location: Arlington, TX
Distribution: n/a
Posts: 61

Rep: Reputation: 15
Sharing one home directory with multiple users


How do I share one "home directory" with multiple users... in case you are wondering... I am doing this to comply with the VSFTPD CHROOT file which allows me to set a list of users who are automatically chrooted to their home directory and locked into it. In my case I have a list of users that I want to chroot into a directory named PUB... YaST will only let me assign PUB to one user.
 
Old 05-07-2005, 09:06 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,783

Rep: Reputation: 311Reputation: 311Reputation: 311Reputation: 311
What about group permissions? Set a group permission for PUB, and add the users names to that group. One user is still the owner, but members of the group also have access. Which is not the same as each user having a folder, as in /home/user-1, /home/user-2, etc.
 
Old 05-07-2005, 09:19 PM   #3
exodist
Senior Member
 
Registered: Aug 2003
Location: Portland, Oregon
Distribution: Gentoo
Posts: 1,372

Rep: Reputation: 46
chown root:[group] /home/dir-to-share #replace [group] with a group all the users are a member of
chmod -R 770 /home/dir-to-share #the second 7 gives full access to group members, -R makes it recursive
edit /etc/passwd
change the home directory column for the users in question to /home/dir-to-share

note: some programs do not run when config files have certain permissions, those will dislike this config and may complain or fail all-out.
 
Old 05-08-2005, 02:09 AM   #4
cwolf78
Member
 
Registered: Apr 2005
Location: Arlington, TX
Distribution: n/a
Posts: 61

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by bigrigdriver
What about group permissions? Set a group permission for PUB, and add the users names to that group. One user is still the owner, but members of the group also have access. Which is not the same as each user having a folder, as in /home/user-1, /home/user-2, etc.
i see what you are saying... except that I want to chroot multiple users into one directory (pub)... the only way that I know to do that is to add users to a chroot list that sends them to their home directory and locks them in. Can I some how make all the users I want to chroot into pub a member of a group that forces them to use pub as their home directory ???
 
Old 05-08-2005, 11:32 AM   #5
cwolf78
Member
 
Registered: Apr 2005
Location: Arlington, TX
Distribution: n/a
Posts: 61

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by bigrigdriver
What about group permissions? Set a group permission for PUB, and add the users names to that group. One user is still the owner, but members of the group also have access. Which is not the same as each user having a folder, as in /home/user-1, /home/user-2, etc.
Ok, how do I set a group permission ?
 
Old 05-08-2005, 12:16 PM   #6
cwolf78
Member
 
Registered: Apr 2005
Location: Arlington, TX
Distribution: n/a
Posts: 61

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by exodist
chown root:[group] /home/dir-to-share #replace [group] with a group all the users are a member of
chmod -R 770 /home/dir-to-share #the second 7 gives full access to group members, -R makes it recursive
edit /etc/passwd
change the home directory column for the users in question to /home/dir-to-share

note: some programs do not run when config files have certain permissions, those will dislike this config and may complain or fail all-out.
Hooray! I finally got it working! However... there is still one user who chroots but will not stay locked in the home directory... this is a user whose permissions I did a number on before I followed these instructions. Is there a way to reset that user ?
thanks again
 
Old 05-08-2005, 12:25 PM   #7
cwolf78
Member
 
Registered: Apr 2005
Location: Arlington, TX
Distribution: n/a
Posts: 61

Original Poster
Rep: Reputation: 15
I deleted the user who was not staying locked in and gave him another account... a new account that i setup just now... it works fine. But now, the other user has suddenly stopped staying locked in to his directory ???
Does this have to do with the UID number ?
 
Old 05-08-2005, 03:16 PM   #8
exodist
Senior Member
 
Registered: Aug 2003
Location: Portland, Oregon
Distribution: Gentoo
Posts: 1,372

Rep: Reputation: 46
no, nothing to do with the uid, not sure what would cause it to stop letting one of the users in, how many users are we talking?
 
Old 05-08-2005, 05:14 PM   #9
cwolf78
Member
 
Registered: Apr 2005
Location: Arlington, TX
Distribution: n/a
Posts: 61

Original Poster
Rep: Reputation: 15
Out of three users... everyone gets in... but it won't keep one user locked in. I added an alternate account for the one that would not stay chrooted and then deleted the bad account... as soon as I did that then another account that had been working fine became unable to stay chrooted.
 
Old 05-08-2005, 05:21 PM   #10
exodist
Senior Member
 
Registered: Aug 2003
Location: Portland, Oregon
Distribution: Gentoo
Posts: 1,372

Rep: Reputation: 46
what do you mean by locked in, does the user spontaniously log out? and chroot is when you make a new directory the root directory, it is when for example you connect a drive from another system w/ another linux install in it, so you mount it and chroot /path/to/filesystem and you are then runnign the os on the drive fromt he other system (it can be used for other similar things, but this is most common)

do you perhapse just mean changing directories to be in the home dir? like: cd /home/username
 
Old 05-08-2005, 06:35 PM   #11
cwolf78
Member
 
Registered: Apr 2005
Location: Arlington, TX
Distribution: n/a
Posts: 61

Original Poster
Rep: Reputation: 15
I am sure I am all turned around... I am getting the terms chroot and locked in from a vsftpd.conf help file. To me chroot meant that when a user logged on via FTP they were sent to a directory that I made their home... ie: /pub. After they were logged on and chrooted to /pub... they could not access any directory higher than /pub ... does that make more sense ?
 
Old 05-08-2005, 06:58 PM   #12
exodist
Senior Member
 
Registered: Aug 2003
Location: Portland, Oregon
Distribution: Gentoo
Posts: 1,372

Rep: Reputation: 46
ok I see now, chroot the ftp term, the base directory in the tree, so yes the terms do coincide, I missed the context, and the reason purpose behind this. well I think the best thing to do would be to make a pub directory, have no home directory's for the users in question, then somewhere in the config file you should be able to set a default ftp root for specific users, or at least anonymous user. not sure if this helps.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Multiple dists - sharing /home ??? stevesk Linux - Newbie 3 09-02-2005 08:03 PM
Samba Sharing entire Home Directory jawaking00 Linux - Newbie 2 07-25-2005 08:13 AM
Users can only see home directory bluenix Linux - General 20 03-12-2005 08:51 AM
One Directory, multiple users gdboling Linux - Networking 4 09-04-2003 01:09 PM
Sharing files not in Home directory tomsa Linux - Networking 0 07-22-2003 03:22 PM


All times are GMT -5. The time now is 11:15 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration