On Wednesday 01 April 2009 16:55:31 Mark David Dumlao wrote:
> On Wed, Apr 1, 2009 at 12:31 PM, Steven Lembark <lemb...@wrkhors.com> wrote:
> > That was the idea, RH did it that way a dozen
> > years ago for exactly the reason you mention:
> > dir mods of 02770 make it easy to share files
> > but require 002 umask. Fix was to set the
> > per-user group, allowing private dir's (largely
> > $HOME) to have tighter mods with files below
> > them "group readable" by a single-user group.
>
> Hey, I use 2770 for directories too, but I notice there's one problem
> with that setup. If a user moves or copies a directory to a share that
> with 2770 mods, the files under moved directory retain their old
> group.
>
> Which is technically correct: small, tightly managed shares (I'm
> thinking programmers and code) probably need user-intervention for
> keeping permissions in check. But I'm doing a bunch of really large
> data shares on the order of several thousand pictures, sounds, clips,
> etc that are meant to have essentially free-for-all permissions, and
> having to manually have all users change the group of copied/moved
> files to the shared group wasn't acceptable. So I did a workaround for
> it so that files under my shares are correctly group-owned after
> default copy/move operations.

Wow. That's convulted. Simply setgid on the top-most directory that stuff is 
copied into, and all files and dirs created in it are owned by the same group 
that owns the top directory:

chmod g+s /path/to/dest/dir/

None of that tedious mucking about that you resorted to.

-- 
alan dot mckinnon at gmail dot com

Reply via email to