Gentoo Archives: gentoo-user

From: Remy Blank <remy.blank_asps@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Re: permissions for a common folder
Date: Tue, 19 Sep 2006 12:22:03
Message-Id: eeon20$q3o$1@sea.gmane.org
In Reply to: [gentoo-user] permissions for a common folder by "Stefán István"
1 Stefán István wrote:
2 > Is there any way to tell
3 > the Linux to automatically set the rights to 664 or 775 in this common
4 > directory (and only in this)?
5
6 This is normally done by setting the umask to 002 instead of 022 for all
7 users (in /etc/profile), and creating a separate primary group for every
8 user with the same name as the user. Then all files and directories
9 created by users will have 664 resp. 775 permissions. When creating
10 files in "normal" directories, the files will have the "private" primary
11 group of the user, and will therefore only be writable by the user. When
12 creating files in directories with the SGID bit set, the group will be
13 the same as the directory, and the file will be writable by all members
14 of the group.
15
16 This is the default strategy in RedHat distributions (or at least it was
17 when I switched to Gentoo, around 9.0 or so).
18
19 You might be able to get the same effect locally (i.e. only in your
20 shared directory) by using POSIX ACLs. See 'man acl' for more info.
21
22 -- Remy
23
24
25 Remove underscore and suffix in reply address for a timely response.
26
27 --
28 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] Re: permissions for a common folder "Stefán István" <stefi@××××××××××××.hu>