From owner-freebsd-questions Tue Sep 25 23:19:30 2001 Delivered-To: freebsd-questions@freebsd.org Received: from post.mail.nl.demon.net (post-11.mail.nl.demon.net [194.159.73.21]) by hub.freebsd.org (Postfix) with ESMTP id 95B4837B416 for ; Tue, 25 Sep 2001 23:19:20 -0700 (PDT) Received: from [212.238.77.116] (helo=buffy.raggedclown.net) by post.mail.nl.demon.net with esmtp (Exim 3.22 #1) id 15m82O-000MER-00; Wed, 26 Sep 2001 06:19:17 +0000 Received: by buffy.raggedclown.net (Ragged Clown Mailhost, from userid 500) id A4524BD64; Wed, 26 Sep 2001 08:08:07 +0200 (CEST) Date: Wed, 26 Sep 2001 08:08:07 +0200 From: Cliff Sarginson To: m p Cc: lucas@slb.to, questions@freebsd.org Subject: Re: your mail Message-ID: <20010926080807.C3574@raggedclown.net> References: <20010925141153.G26120@comp04.prc.uic.edu> <20010925194751.91509.qmail@web13302.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.16i In-Reply-To: <20010925194751.91509.qmail@web13302.mail.yahoo.com>; from sumirati@yahoo.de on Tue, Sep 25, 2001 at 09:47:51PM +0200 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, Sep 25, 2001 at 09:47:51PM +0200, m p wrote: > --- Lucas Bergman schrieb: > > chown testuser:testgroup > > > chmod 750 > > > > I think you forgot something on these command lines... :) > > > > Lucas > > Ups, yes, > > the lines should read the following: > > mkdir /home/testuser > chown testuser:testgroup /home/testuser > chmod 750 /home/testuser > Mmm. Long ago and far away real UN*X users were intimate with octal (base 8) numbers, the chmod arguments were an octal "mask" representing the groups of permission bits in a file. So if you look at each of the normal permissions on a file (forgetting about exotica like set user id on execution etc), you have read/write/execute each represented by a bit in a 3 bit mask. So for 3 bits the top bit set = 4 (Read), the next 2(Write), the last 1 (eXecute). So..7 is as a bit mask "111" = "rwx" i.e. 4+2+1 5 is as a bit mask "101" = "r-x" i.e. 4+0+1 0 is as a bit mask "000" = "---" i.e. 0+0+0 The first octal digit refers to the file owner The second to the file group The third to "other" or world as we used to call it. Of course "x" does not mean execute when it refers to a directory, it means the permission to search/cd into that directory. Some Johnny-come-lately invented another syntax for using chmod as one of the previous posters mentioned. Us oldies still use the mask values..*sigh*. Of course there is just a tad more to it than that, sticky (t) bits etc...that don't mean what they used to. Blame it on PDP 11's. -- Regards Cliff To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message