Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.unix.programmer > #654
| From | Rainer Weikusat <rweikusat@mssgmbh.com> |
|---|---|
| Newsgroups | comp.unix.programmer |
| Subject | Re: mq_open - permission denied |
| Date | 2011-05-24 11:29 +0100 |
| Message-ID | <87y61wjssm.fsf@sapphire.mobileactivedefense.com> (permalink) |
| References | (2 earlier) <70bcc640-5ac0-4e7c-8db6-4fb8aeef8912@w21g2000yqm.googlegroups.com> <87aaed7mh1.fsf@sapphire.mobileactivedefense.com> <30f1daaf-8526-448b-9523-0a802f312983@p23g2000vbl.googlegroups.com> <E0wCp.11111$dI.2796@news.usenetserver.com> <7a6fcba8-2a83-49bd-be40-bb4e5955a29c@hg8g2000vbb.googlegroups.com> |
gogol <eromascanu@gmail.com> writes:
[...]
> This is the description of umask function:
> -----------------------------------------------------------------------------------------------------
> Synopsis
> #include <sys/types.h>
> #include <sys/stat.h>
>
> mode_t umask(mode_t mask);
> Description
> umask() sets the calling process's file mode creation mask (umask) to
> mask & 0777.
> ----------------------------------------------------------------------------------------------------------
>
> So, if I call umask(0), then the mode creation mask is: 0 & 0777,
> which is 0. I.e. all bits are reset.
It is often helpful to read a text completely before believing to know
what it was meant to say. Specifically, the text you partially quoted
continues with
(i.e., only the file permission bits of mask are used)
which means that if you use, say, 04022 as argument (04000 is the
set-user-id bit), the resulting umask will be 022. Somewhat later in
the same text, you could find this sentence:
Specifically, permissions in the umask are turned off from the
mode argument to open(2) and mkdir(2).
which is what I wrote in my reply to your original post.
Back to comp.unix.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
mq_open - permission denied gogol <eromascanu@gmail.com> - 2011-05-21 06:53 -0700
Re: mq_open - permission denied Rainer Weikusat <rweikusat@mssgmbh.com> - 2011-05-22 21:42 +0100
Re: mq_open - permission denied gogol <eromascanu@gmail.com> - 2011-05-22 14:42 -0700
Re: mq_open - permission denied Rainer Weikusat <rweikusat@mssgmbh.com> - 2011-05-23 11:14 +0100
Re: mq_open - permission denied gogol <eromascanu@gmail.com> - 2011-05-23 06:15 -0700
Re: mq_open - permission denied Rainer Weikusat <rweikusat@mssgmbh.com> - 2011-05-23 15:19 +0100
Re: mq_open - permission denied gogol <eromascanu@gmail.com> - 2011-05-23 16:34 -0700
Re: mq_open - permission denied scott@slp53.sl.home (Scott Lurndal) - 2011-05-23 16:34 +0000
Re: mq_open - permission denied gogol <eromascanu@gmail.com> - 2011-05-23 12:28 -0700
Re: mq_open - permission denied Rainer Weikusat <rweikusat@mssgmbh.com> - 2011-05-24 11:29 +0100
Re: mq_open - permission denied gogol <eromascanu@gmail.com> - 2011-05-23 06:18 -0700
csiph-web