Gentoo Archives: gentoo-user

From: "Stefán István" <stefi@××××××××××××.hu>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: permissions for a common folder
Date: Wed, 20 Sep 2006 08:07:42
Message-Id: 200609201001.43325.stefi@geohidroterv.hu
In Reply to: [gentoo-user] Re: permissions for a common folder by Remy Blank
1 kedd 19 szeptember 2006 14.15 dátummal Remy Blank ezt írta:
2 > Stefán István wrote:
3 > > Is there any way to tell
4 > > the Linux to automatically set the rights to 664 or 775 in this common
5 > > directory (and only in this)?
6 >
7 > This is normally done by setting the umask to 002 instead of 022 for all
8 > users (in /etc/profile), and creating a separate primary group for every
9 > user with the same name as the user. Then all files and directories
10 > created by users will have 664 resp. 775 permissions. When creating
11 > files in "normal" directories, the files will have the "private" primary
12 > group of the user, and will therefore only be writable by the user. When
13 > creating files in directories with the SGID bit set, the group will be
14 > the same as the directory, and the file will be writable by all members
15 > of the group.
16 >
17 > This is the default strategy in RedHat distributions (or at least it was
18 > when I switched to Gentoo, around 9.0 or so).
19 >
20 > You might be able to get the same effect locally (i.e. only in your
21 > shared directory) by using POSIX ACLs. See 'man acl' for more info.
22
23 Okay, I think I have to use acl. I've read its documentation, and set up the
24 following acl's:
25
26 setfacl -m d:u::rw /home/stefi/kepek/
27 setfacl -m d:g::rw /home/stefi/kepek/
28 setfacl -m d:o::r /home/stefi/kepek/
29
30 Now, if I create a file in this directory, it's permission will be 664 instead
31 of the default 644. That's very good.
32 But if I create a directory it's permissons also will be 664. But I want it to
33 be 775. How can I achive this?
34
35
36 Thanks,
37 Istvan
38
39 --
40 gentoo-user@g.o mailing list

Replies

Subject Author
[gentoo-user] Re: permissions for a common folder Remy Blank <remy.blank_asps@×××××.com>