Solved

Can two users share a home directory?

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to enable sync between two yum repo? 1 41
how to configure linux OS using Ubuntu 7 59
How to mount nfs share on this CentOS server? 6 43
The better OS Architecture 13 69
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
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.

820 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