Gentoo Archives: gentoo-user

From: Matteo Pillon <matteo.pillon@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] permissions for a common folder
Date: Tue, 19 Sep 2006 12:38:00
Message-Id: 20060919123127.GA30789@neptune.octopus
In Reply to: [gentoo-user] permissions for a common folder by "Stefán István"
1 Hi,
2
3 On Tue, Sep 19, 2006 at 01:53:13PM +0200, Stefán István wrote:
4 > We have a file server, and there are a common directory for a group of a
5 > users. I set this common folder's permission to 2775 and that results that a
6 > newly created file or directory will have the same goup owner as the common
7 > dir. But the problem is, that if someone creates a file or a directory in
8 > this common folder, the permissions will be 644 or 755, and so the other
9 > users in the same group can't write that file or directory, only if the
10 > creator of the entry sets it manually to 664 or 775. Is there any way to tell
11 > the Linux to automatically set the rights to 664 or 775 in this common
12 > directory (and only in this)?
13
14 It depends on your setup, if you're using bash, you can subtitute cd
15 with a new function:
16
17 cd () {
18 if ....; then
19 umask 0002
20 else
21 umask 0022
22 fi
23 command cd $@
24 }
25
26 Bye.
27
28 --
29 * Pillon Matteo
30 --
31 gentoo-user@g.o mailing list