Date: Wed, 26 Sep 2001 08:08:07 +0200 From: Cliff Sarginson <cliff@raggedclown.net> To: m p <sumirati@yahoo.de> Cc: lucas@slb.to, questions@freebsd.org Subject: Re: your mail Message-ID: <20010926080807.C3574@raggedclown.net> In-Reply-To: <20010925194751.91509.qmail@web13302.mail.yahoo.com>; from sumirati@yahoo.de on Tue, Sep 25, 2001 at 09:47:51PM %2B0200 References: <20010925141153.G26120@comp04.prc.uic.edu> <20010925194751.91509.qmail@web13302.mail.yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Sep 25, 2001 at 09:47:51PM +0200, m p wrote: > --- Lucas Bergman <lucas@slb.to> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010926080807.C3574>