Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 01 Dec 1998 11:42:25 +1100
From:      Eddie Irvine <eirvine@tpgi.com.au>
To:        Chris <chrisj@outcast.media-net.net>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: umask
Message-ID:  <36633B71.40A44BFD@tpgi.com.au>
References:  <Pine.BSF.3.96.981130183801.9430A-100000@outcast.media-net.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Chris wrote:
> 
> hello. i was wondering if someone could please explain the working of
> umask. i understand what it does and what not, just not how to work out
> the octal numbers to get the desired result.
> 

Well, consider a umask like, "77x" where x is a number 
between 1 and 7.

The value of x is gotten this way:

	Start at 0
	If we want execute permission, add 1
	If you want write permission, add 2
	If you want read permission, add 4

So, read and execute will be 1 + 4 = 5, and read 
and write permission will be 2 + 4 = 6.


Any clearer?

Eddie.

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?36633B71.40A44BFD>