Neil Bothwick schrieb:
On Sat, 23 Apr 2016 14:42:56 +0200, hw wrote:

I've done this with ACLs in the past, which is why I suggested it, but
it's a pain to set up if you haven't used them before. Alan's
suggestion of using inotify is probably simplest. Install incrond and
put something like this in a file in /etc/incron.d

/shared/dir IN_CREATE,IN_MODIFY chmod g+w $#

That should actually be $@/$#

Thanks, that's what I used.

PS: How about subdirectories?  The users sharing the directory can
create and delete them as well, and files within them; yet incron
ignores what happens in subdirectories.

That's a prpblem, maybe ACLs would be more suitable after all.

Using 'chmod -R g+w $#' isn't very appealing, and how safely does it
handle file names?

What is unappealing about it? I've never had any problem with file names,
but I don't use odd ones. You could quote the $@/$# just in case,
although if there's no shell expansion taking place it shouldn't be
necessary.

Using 'chmod -R' is unappealing because changing access rights for
so-many-thousand or so directory-entries once per minute might
wear out the SSDs sooner than otherwise.  It might make things
worse that the file system is that of a KVM VM residing in a sparse
file on these SSDs.

And it may lead to confusion of the users when they suddenly can
write to files they couldn't write to a few seconds before.


Reply via email to