SLUG Mailing List Archives
Re: [SLUG] mkdir
- To: Matthew Hannigan <mlh@xxxxxxxxxx>
- Subject: Re: [SLUG] mkdir
- From: Cal Edwards <edencane@xxxxxxxxx>
- Date: Fri, 17 Feb 2012 09:56:15 +1030
- Cc: slug@xxxxxxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=AzhmxBT0vdCrbUxuYPjkhTVhPl3UKogLA5Gd5zVj6rw=; b=N6Z91iIyrW/i+2/f96lEXscVi7FyMrlSkx/DF8efBpanx/O3WWTZ4yeeQOiRsAyDLO 0w6ZIwSCx6wOO0IXEfPsrl9gjrQ0ad0F6blZ5XuHfbMNWEhPqK6nrSFv6zoxdRmlCU/m h7k+ccilCqUeW5rQ2Sfpz8pfBb+tVeNJ0ZPOE=
On Fri, Feb 17, 2012 at 8:42 AM, Matthew Hannigan <mlh@xxxxxxxxxx> wrote:
> Grant Street <grants@xxxxxxxxx> gave the answer previously,
> chmod 2755 topdir
> which sets the setgid (the 2) and relaxed perms (the 755)
> But this didnt fix the existing dirs group ownership.
> Also you might want 775 instead of 755.
> See below for my take.
> On Wed, Feb 15, 2012 at 08:44:41PM +1030, Glen Turner wrote:
> [ .. ]
> > directory -- search for "sticky bit on directory". Even that might not
> not sticky bit, setgid bit (common mistake)
> > give the group access, it depends on the user's umask.
> The better couple of invocations are:
> chmod g+s topdir # set topdir setgid bit so group ownership is
> chgrp -hR SOMEGRP topdir # repair group of existing files
> and dirs
> chmod -R g+rwX,o+rX topdir # to repair permissions for
> existing files and dirs
> I tend to use symbolic rather than octal,
> tends to be easier to remember and more precise/accurate.
> PS. exercise for the reader , find out what the -h and the capital X do
> (they're important!)
Your points taken on the 775 and the -h and -X options