You are not logged in.

#1 2010-05-31 05:42:50

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

permissions problems for a community-use dir w/ multiple users

I would like to have everyone in the 'users' group fully access /home/share as if every user in the group is the same user.  For example, anyone should be able to add, remove, modify files and dirs.  I followed this guide but am at a loss as to why I can't access the new dir as my normal users.

mkdir /home/share
groupadd share
useradd -d /home/share -g share -m sharemin
passwd sharemin
usermod -a -G share squeeze
usermod -a -G share jennifer
chown -R sharemin.share /home/share/
chmod -R 770 /home/share/
chmod -R g+s /home/share/

Neither of my users can access /home/share however:

$ cd /home/share/
bash: cd: /home/share/: Permission denied

I know both are in the damn share group though...

$ id squeeze
uid=1000(squeeze) gid=1000(squeeze) groups=1000(squeeze),7(lp),91(video),92(audio),93(optical),94(floppy),95(storage),98(power),100(users),97(camera),108(vboxusers),1006(truecrypt),1007(share)

Here is the ls -l for /home:

drwx------ 55 jennifer     jennifer     4096 May 30 17:21 jennifer
drwx------  2 root     root    16384 Nov  7  2009 lost+found
drwxrws---  3 sharemin share    4096 May 31 02:55 share
drwx------ 81 squeeze  squeeze 12288 May 31 01:45 squeeze

1) What's going on with this?
2) Is there a better way to setup this share?
Suggestions are welcomed smile

Last edited by graysky (2010-05-31 07:30:26)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#2 2010-05-31 06:45:52

sand_man
Member
From: Australia
Registered: 2008-06-10
Posts: 2,164

Re: permissions problems for a community-use dir w/ multiple users

I don't understand. Whoever creates a new folder will become the owner. That's just how it is. But that doesn't mean the group shouldn't be able to edit them.


neutral

Offline

#3 2010-05-31 07:04:08

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: permissions problems for a community-use dir w/ multiple users

I edited the original post... hopefully it's more clear now.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#4 2010-05-31 07:06:48

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,771

Re: permissions problems for a community-use dir w/ multiple users

sand_man wrote:

I don't understand. Whoever creates a new folder will become the owner. That's just how it is. But that doesn't mean the group shouldn't be able to edit them.

But note that his permissions don't provide write access for the group.  Those default permissions are determined by each user's settings on a user by user basis.  The question, as I understand it, is how to override the user's settings to create a different default for this directory.

I would suggest creating a daemon that watches the directory for changes, and then reaches in with an invisible hand to dynamically change permissions to the policy you require.  I quick and nasty method might be to set up an incantation based upon find as a cron job.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Online

#5 2010-05-31 07:10:24

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,771

Re: permissions problems for a community-use dir w/ multiple users

graysky wrote:

I edited the original post... hopefully it's more clear now.

Wow, that is some edit.  Now you lost me.  I will reevaluate.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Online

#6 2010-05-31 07:20:07

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,771

Re: permissions problems for a community-use dir w/ multiple users

Are you sure you want 's' set on the group execute bit?  It seems to me that means the effective UID for group operations is root.

What if you just make /home/share rwxrwx--- ??

I'm off to bed.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Online

#7 2010-05-31 07:35:04

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: permissions problems for a community-use dir w/ multiple users

@ewaller - tried that... still no access.  I switched the group from "share" to "users" and I can now access it... new problem is that the whole point of this exercise was to allow ANY user in the group to read/write/delete files and dirs under /home/share but that is not the behavior....

$ touch /home/share/test
ls -l /home/share
-rw-r--r-- 1 squeeze  users 2 May 31 03:38 test

Now only squeeze can read/write that file.... others can only read it.  The whole point of this was to allow any user in the group to read/write/del files and dirs!

How can I achieve this?

Last edited by graysky (2010-05-31 07:46:09)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#8 2010-05-31 07:50:52

byte
Member
From: Düsseldorf (DE)
Registered: 2006-05-01
Posts: 2,046

Re: permissions problems for a community-use dir w/ multiple users

'man umask'


1000

Offline

#9 2010-05-31 16:06:05

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,771

Re: permissions problems for a community-use dir w/ multiple users

byte wrote:

'man umask'

Yes, but my understanding is that this setting must exist for each user.  It could be encouraged by a system-wide login policy, but there is nothing to prevent the user from changing it.  In addition, umask applies to all files created, regardless of the location in the file system


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Online

#10 2010-05-31 16:58:42

demian
Member
From: Frankfurt, Germany
Registered: 2009-05-06
Posts: 709

Re: permissions problems for a community-use dir w/ multiple users

set umask in /etc/profile. maybe you have to source it with your different users though.


no place like /home
github

Offline

Board footer

Powered by FluxBB