Solved

Can two users share a home directory?

Posted on 2006-11-14
3
198 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
  • 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

760 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now