Gentoo Archives: gentoo-user

From: Neil Bothwick <neil@××××××××××.uk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] local shared directory
Date: Thu, 17 Mar 2016 23:34:34
Message-Id: 20160317233407.343dfb9b@digimed.co.uk
In Reply to: Re: [gentoo-user] local shared directory by Rich Freeman
1 On Thu, 17 Mar 2016 18:38:56 -0400, Rich Freeman wrote:
2
3 > > umask is just not viable either, as a) it's global and affects all
4 > > files a user creates and b) by definition umask is modifiable by the
5 > > user (it's a feature to help users out so they don't need to chmod
6 > > every file every time) and c) you can't stop them doing it (by
7 > > design).
8 >
9 > Actually, this is completely viable. Just set the default umasks to
10 > 007, and create a new group for each user as their default group (and
11 > don't have all their home directories be owned by some users group).
12 > This is how this sort of situation was handled long before POSIX ACLs
13 > became common, and I know that some distros behave this way by default
14 > for this reason (this was the case in the distro I used right before I
15 > switched to Gentoo).
16 >
17 > If users chmod a file then tell them not to. If you must, set up some
18 > cron job to clean up after them.
19 >
20 > But, you can of course do this with ACLs as well. I haven't tried
21 > setting those up personally.
22
23 I've done this with ACLs in the past, which is why I suggested it, but
24 it's a pain to set up if you haven't used them before. Alan's suggestion
25 of using inotify is probably simplest. Install incrond and put something
26 like this in a file in /etc/incron.d
27
28 /shared/dir IN_CREATE,IN_MODIFY chmod g+w $#
29
30
31 --
32 Neil Bothwick
33
34 Windows Error #56: Operator fell asleep while waiting.

Replies

Subject Author
Re: [gentoo-user] local shared directory hw <hw@×××××.de>
Re: [gentoo-user] local shared directory hw <hw@×××××.de>