1 |
Neil Bothwick schrieb: |
2 |
> On Sat, 23 Apr 2016 14:42:56 +0200, hw wrote: |
3 |
> |
4 |
>>> I've done this with ACLs in the past, which is why I suggested it, but |
5 |
>>> it's a pain to set up if you haven't used them before. Alan's |
6 |
>>> suggestion of using inotify is probably simplest. Install incrond and |
7 |
>>> put something like this in a file in /etc/incron.d |
8 |
>>> |
9 |
>>> /shared/dir IN_CREATE,IN_MODIFY chmod g+w $# |
10 |
> |
11 |
> That should actually be $@/$# |
12 |
|
13 |
Thanks, that's what I used. |
14 |
|
15 |
>> PS: How about subdirectories? The users sharing the directory can |
16 |
>> create and delete them as well, and files within them; yet incron |
17 |
>> ignores what happens in subdirectories. |
18 |
> |
19 |
> That's a prpblem, maybe ACLs would be more suitable after all. |
20 |
> |
21 |
>> Using 'chmod -R g+w $#' isn't very appealing, and how safely does it |
22 |
>> handle file names? |
23 |
> |
24 |
> What is unappealing about it? I've never had any problem with file names, |
25 |
> but I don't use odd ones. You could quote the $@/$# just in case, |
26 |
> although if there's no shell expansion taking place it shouldn't be |
27 |
> necessary. |
28 |
|
29 |
Using 'chmod -R' is unappealing because changing access rights for |
30 |
so-many-thousand or so directory-entries once per minute might |
31 |
wear out the SSDs sooner than otherwise. It might make things |
32 |
worse that the file system is that of a KVM VM residing in a sparse |
33 |
file on these SSDs. |
34 |
|
35 |
And it may lead to confusion of the users when they suddenly can |
36 |
write to files they couldn't write to a few seconds before. |