Solved

Can two users share a home directory?

Posted on 2006-11-14
3
208 Views
Last Modified: 2013-12-16
Greetings!  

I have two users that both need to share a home directory.  The home directory is on a raid device (path: /mnt/raid/images/jpg).  I have a user (usera) set up with their home directory pointing to /mnt/raid/images/jpg.  This is so that when they use vsftp they will start in this directory (they do not have shell access).  The permissions for the directory are set to 777.  

My question:  will adding another user (user2) with the same home directory screw anything up?  My gut feeling says no, but it's always better to double check (since my test server is currently smoking).

Please and thank you.
0
Comment
Question by:Ziggie013
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 14

Accepted Solution

by:
ygoutham earned 75 total points
ID: 17944732
you can put the /home/user directory with the same group.  add both the users to a separate group and have the permissions set to 770. should solve it.  do not create any separate group for the users.  add them both to the same group as their primary group.

usermod -g separate_group user1
usermod -g separate_group user2
chgrp -R separate_group /home/user
chmod -R 770 /home/user

that should do the trick.
0
 
LVL 14

Expert Comment

by:ygoutham
ID: 17944736
when you change the directory permissions to 777 then the files created by different users (assuming that they have their own private group for their username) would be on user:group basis.  change the vsftpd.conf to have the upload mask as 0770 so that the group also has read write permissions.
0
 
LVL 1

Author Comment

by:Ziggie013
ID: 17946482
Well, 777 is what we want cuz other users add files to these directories too (via Samba).  

You did though answer my question that there should be no weird results in allowing two users to share a home directory.  

Thanks.
0

Featured Post

Command Line Tips and Tricks

The command line is a powerful tool at the disposal of every Linux user. Although Linux distros come with beautiful user interfaces, it's worthwhile to learn the command line because it allows you to do a number of things that you otherwise cannot do from the GUI.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question