public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] problems making shareable directory shareable
@ 2006-10-17  5:15 Richard Broersma Jr
  2006-10-17  7:19 ` [gentoo-user] " Remy Blank
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Broersma Jr @ 2006-10-17  5:15 UTC (permalink / raw
  To: Gentoo Users

I am trying to create a shareable directory, where all newly created files will have group rwx
permissions assigned.

I followed the example found at:
http://www.gentoo.org/doc/en/articles/lpi-101-intermediate-p3.xml#doc_chap3_sect19

and preformed the following steps:

mkdir /home/share
chgrp users /home/share
chmod g+s /home/share

however, when user1 preforms 'echo hello > ./hello.txt' 
from within share the file has the following permissions:

drwxrwsr--  8 root    users    4096 Oct 16 20:53 .
-rw-r--r--  1 user1   users       6 Oct 16 20:53 hello.txt

and user2 is not able to modify this new created file.  I know that I can execute a umask every
time the users log in to insure that all new created files will have the correct premissions, but
is this really the correct what to handle this problem?

Can anyone point me in the write direction?

Thanks for the help.

Regards,

Richard Broersma Jr.
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 2+ messages in thread

* [gentoo-user]  Re: problems making shareable directory shareable
  2006-10-17  5:15 [gentoo-user] problems making shareable directory shareable Richard Broersma Jr
@ 2006-10-17  7:19 ` Remy Blank
  0 siblings, 0 replies; 2+ messages in thread
From: Remy Blank @ 2006-10-17  7:19 UTC (permalink / raw
  To: gentoo-user

Richard Broersma Jr wrote:
> I know that I can execute a umask every
> time the users log in to insure that all new created files will have
> the correct premissions, but is this really the correct what to
> handle this problem?

That's one way of doing it, which I have seen used on RedHat
distributions (and that I have implemented on my machines). Instead of
having a default umask of 022 and setting the primary group of new users
to "user", you set the umask to 002 and have a separate primary group
for every user (usually with the same name as the user). This way,
shared directories can be set up as you described, and files and
directories are created with 0664 resp. 0775 permissions.

But if you haven't set up your environment for that, the easiest
solution is to use POSIX ACLs (see "man acl"). Set a default ACL of:

  default:user::rwx
  default:group::rwx
  default:other::---

on the (empty) shared directory, then copy over your files.

You might have to enable ACLs in your kernel and /etc/fstab, and to
enable the "acl" USE flag (and re-emerge affected packages) for this to
work.

-- Remy


Remove underscore and suffix in reply address for a timely response.

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-10-17  7:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-17  5:15 [gentoo-user] problems making shareable directory shareable Richard Broersma Jr
2006-10-17  7:19 ` [gentoo-user] " Remy Blank

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox