[Gllug] sharing folders between users

Justin Perreault justinperreault at dl-jp.com
Thu Feb 18 00:30:34 UTC 2010


On Wed, 2010-02-17 at 16:57 +0000, John Edwards wrote:
> On Wed, Feb 17, 2010 at 04:40:41PM +0000, Justin Perreault wrote:
> > I am wanting to share files between two users on one machine. It does
> > not make sense to me that I would need to install smb to do that.
> > 
> > I have tried setting up an extra user adding the real users to its
> > group. 
> > 
> > So far no success. Searching found me
> > http://insanelabs.com/tag/share-directory/ 
> Before describing "why" it does not work, could you describing
> "how" it does not work.
> 
> Can you view the contents of directories as any of the 3 users?
Each user can access their own files under /home not others.

> Can you read files as any of the 3 users?
Each user can read files in their own directory under /home not others.

> Can you create new files as any of the 3 users?
Each user can create new files to their own directory under /home not
others.

> Can you write to existing files as any of the 3 users?
Each user can write files to their own directory under /home not others.


> What does 'ls -al' show in those directories?
As a user

ls -al /home shows
drwx--S---.  4 shared shared 4096 2010-02-17 16:10 shared

ls -al /home/shared shows
drwx--S---.  4 shared shared 4096 2010-02-17 16:10 shared

as root
ls -al /home shows the same

ls -al /home/shared shows
drwx--S---. 4 shared shared 4096 2010-02-17 16:10 .
drwxr-xr-x. 5 root   root   4096 2010-02-17 16:10 ..
-rw-r-Sr--. 1 shared shared   18 2009-12-11 11:51 .bash_logout
-rw-r-Sr--. 1 shared shared  176 2009-12-11 11:51 .bash_profile
-rw-r-Sr--. 1 shared shared  124 2009-12-11 11:51 .bashrc
drwxr-sr-x. 2 shared shared 4096 2009-09-24 01:22 .gnome2
drwxr-sr-x. 4 shared shared 4096 2010-02-16 01:20 .mozilla

> Running commands like "groups" and "members" will check that
> you have the group membership correct. Also remember that group
> membership is set at login, so you will need to logout after
> making changes.
I did not know that, thanks.

> What selinux controls depends on what defaults your Linux
> distribution has set and if you have changed any of them.

> I would also say that the "new user" is not really needed.
> You just need a new group, add the 2 users to that and you
> can set up the shared directory anywhere you like (eg 
> somewhere under /srv/).
That's what I thought should work and what I tried to do but had little
luck getting it to work properly. Not knowing about needing to re-login
likely caused me some if not all of my issues.

Many thanks for the assistance.

If the information I have added helps with any ideas please let me know.
I'm thinking I'll undo what now seems over complicated and redo what I
did but try logging out and back in again to do my testing.

Justin

-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list