Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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.
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 ???
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.
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
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 ?
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.
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
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 ?
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.