linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* mode_t mode in mkdir(2)
@ 2002-06-22 21:47 xlp
  2002-06-23  3:05 ` Glynn Clements
  0 siblings, 1 reply; 2+ messages in thread
From: xlp @ 2002-06-22 21:47 UTC (permalink / raw)
  To: linux-c-programming

hi ppl, What are the values for mode_t mode in mkdir(2) ?, HOw can i know what mode to use?, What is the relation between the valude of node and the user file mask?.

bye


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: mode_t mode in mkdir(2)
  2002-06-22 21:47 mode_t mode in mkdir(2) xlp
@ 2002-06-23  3:05 ` Glynn Clements
  0 siblings, 0 replies; 2+ messages in thread
From: Glynn Clements @ 2002-06-23  3:05 UTC (permalink / raw)
  To: xlp; +Cc: linux-c-programming


xlp wrote:

> hi ppl, What are the values for mode_t mode in mkdir(2) ?, HOw can i
> know what mode to use?, What is the relation between the valude of
> node and the user file mask?.

The "mode" argument corresponds to the permission bits from the
st_mode field in "struct stat", i.e.

       S_IRWXU    00700     mask for file owner permissions
       S_IRUSR    00400     owner has read permission
       S_IWUSR    00200     owner has write permission
       S_IXUSR    00100     owner has execute permission
       S_IRWXG    00070     mask for group permissions
       S_IRGRP    00040     group has read permission
       S_IWGRP    00020     group has write permission
       S_IXGRP    00010     group has execute permission
       S_IRWXO    00007     mask for permissions for others (not in group)
       S_IROTH    00004     others have read permission
       S_IWOTH    00002     others have write permisson
       S_IXOTH    00001     others have execute permission

[Note: the above values are octal.]

-- 
Glynn Clements <glynn.clements@virgin.net>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-06-23  3:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-22 21:47 mode_t mode in mkdir(2) xlp
2002-06-23  3:05 ` Glynn Clements

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).