You are not logged in.

#1 2012-03-04 23:35:03

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,965
Website

[SOLVED]Sharing files between user accounts.

I want two user accounts to have full access to a common set of files. I have created a group for that purpose but even with umask settings I always seem to end up with a situation where one user does not have full permissions to one of the "shared" files (e.g. because an application uses it's own internal umask).

Essentially, I want both accounts to act as a single account for certain files, and I have considered sharing the UID, but that creates problems with user names and also exposes all files owned by either user to the other. I have also considered solutions using bindfs, but managing the mount points might become complicated, so I'm hoping that there's a simpler solution.

So, my question is what is the best way to ensure that two users always have full access to a set of files in a given location, which still enabling both users to have private files elsewhere?

Last edited by Xyne (2012-03-05 00:16:55)


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#2 2012-03-04 23:42:13

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [SOLVED]Sharing files between user accounts.

Set the group sticky bit (chmod g+s) on the shared directory and make sure its ownered to the shared group. Files created in that directory will be ownered to the group owner of the directory.

Offline

#3 2012-03-05 00:16:36

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,965
Website

Re: [SOLVED]Sharing files between user accounts.

Thanks, falconindy.

The setgid bit does most of what I need. The rest can be done with access control lists, which I discovered as I was reading up on setgid:
http://brunogirin.blogspot.com/2010/03/ … etgid.html


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

Board footer

Powered by FluxBB