mode_t mode in mkdir(2)
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
Quoted 3 lines · xlp
hi ppl, What are the values for
mode_tmode 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.]
Signature · 1 line
Glynn Clements <[email protected]>