Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

change a directories permissions in UNIX C program

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
How can you change a direcotories permissions in a UNIX C program?
 
Or instead of that - how could you create a directory in UNIX C with the correct permissions?
 
Hi,

see the manual page for the mkdir() function

its basic form is

mkdir(const char *filename,mode_t mode)

filename is the name of the new directory and mode represents the permission bits for the directory. Your mkdir() man page should give you a reference for the different mode #defines.

HTH, [sig]<p>Russ<br><a href=mailto:bobbitts@hotmail.com>bobbitts@hotmail.com</a><br><a href= is in</a><br>[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top