From owner-freebsd-questions@FreeBSD.ORG Sat Feb 4 14:55:17 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB524106564A for ; Sat, 4 Feb 2012 14:55:17 +0000 (UTC) (envelope-from modulok@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id AB9768FC13 for ; Sat, 4 Feb 2012 14:55:17 +0000 (UTC) Received: by qaea17 with SMTP id a17so3460979qae.13 for ; Sat, 04 Feb 2012 06:55:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=eUpe3NYLz6LyStSpXCD6+in4tIiU3AoJTDNSKFHvxmc=; b=J0El6lp6CCwzg6I8LFXPr1igK2IwiiV14AfqvBawhlZsI+G47smNClHhPKmY8R5s0o LDh2y8MvKMurPM7iluM4QAE4Ew6HzoIu7r5lXaf5KNIYtlC9ffOimV937ivXddXiznNR zUb33Iy9AjM5LcVzgELplXPSPRlNFV5dVmYvk= MIME-Version: 1.0 Received: by 10.224.31.69 with SMTP id x5mr13665214qac.21.1328367316945; Sat, 04 Feb 2012 06:55:16 -0800 (PST) Received: by 10.229.8.12 with HTTP; Sat, 4 Feb 2012 06:55:16 -0800 (PST) Date: Sat, 4 Feb 2012 07:55:16 -0700 Message-ID: From: Modulok To: FreeBSD Questions Content-Type: text/plain; charset=ISO-8859-1 Subject: setuid directories - or other option? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2012 14:55:18 -0000 List, I have a media project directory shared with windows users via samba. Every authenticated samba user that accesses the directory is forced to the same FreeBSD user, 'foo', regardless. The group also has write-access: drwxrwxr-x 47 foo foo 2.5K Feb 4 05:42 foo/ Local shell users, however, are a problem. Ideally, I want a simliar behavior for them too i.e. Any files they create in the directory are also owned by the user 'foo'. How do I do that? (See below about setuid.) I wouldn't even care who owns the files, so long as file permission bits in this directory defaulted to 664 so every member of the group 'foo' could edit them. Can I do this without changing every user's default umask? (I want to avoid that.) Is there some kind of 'umask for this directory is blah' feature? I looked at setuid bit on directories. Sounds perfect! BUT I'll be moving to ZFS soon and from what I gather, it won't work there. I guess I could have a cron job run every minute and change offending permission bits, but that feels hacky. Any other ideas? -Modulok-