For Programmers: Free Programming Magazines  


Home > Archive > Unix Programming > February 2008 > use of umask









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author use of umask
lak

2008-02-13, 4:29 am

What is the use of umask?

why that is needed?
Ian Collins

2008-02-13, 4:29 am

lak wrote:
> What is the use of umask?
>
> why that is needed?


man umask.

--
Ian Collins.
Lew Pitcher

2008-02-13, 7:14 pm

On Feb 13, 4:25 am, lak <lakindi...@gmail.com> wrote:
> What is the use of umask?


Unix uses an inherited per-process umask to remove selected permission
bits from files that the process will create.

> why that is needed?


To permit the end-user to override the file permissions selected by
the programmer. Specifically to permit the end-user to /give up/
selected permissions to his files.

Barry Margolin

2008-02-13, 7:14 pm

In article
<beef9de3-1f64-4bbf-909a-d6d4f10d9e4d@s12g2000prg.googlegroups.com>,
lak <lakindia89@gmail.com> wrote:

> What is the use of umask?
>
> why that is needed?


Suppose you don't want to give everyone on the computer write permission
to the files you create. You set the umask to 002 and the world-write
bit will be turned off automatically when you create a file.

Without this, every program that creates files would need to have a way
for you to specify the permissions it should assign.

--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com