Gentoo Archives: gentoo-user

From: Remy Blank <remy.blank_asps@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Re: problems making shareable directory shareable
Date: Tue, 17 Oct 2006 07:28:39
Message-Id: eh2073$43m$1@sea.gmane.org
In Reply to: [gentoo-user] problems making shareable directory shareable by Richard Broersma Jr
1 Richard Broersma Jr wrote:
2 > I know that I can execute a umask every
3 > time the users log in to insure that all new created files will have
4 > the correct premissions, but is this really the correct what to
5 > handle this problem?
6
7 That's one way of doing it, which I have seen used on RedHat
8 distributions (and that I have implemented on my machines). Instead of
9 having a default umask of 022 and setting the primary group of new users
10 to "user", you set the umask to 002 and have a separate primary group
11 for every user (usually with the same name as the user). This way,
12 shared directories can be set up as you described, and files and
13 directories are created with 0664 resp. 0775 permissions.
14
15 But if you haven't set up your environment for that, the easiest
16 solution is to use POSIX ACLs (see "man acl"). Set a default ACL of:
17
18 default:user::rwx
19 default:group::rwx
20 default:other::---
21
22 on the (empty) shared directory, then copy over your files.
23
24 You might have to enable ACLs in your kernel and /etc/fstab, and to
25 enable the "acl" USE flag (and re-emerge affected packages) for this to
26 work.
27
28 -- Remy
29
30
31 Remove underscore and suffix in reply address for a timely response.
32
33 --
34 gentoo-user@g.o mailing list