rtnMichael
Programmer
I'm using mkdir in my program, and it works fine in that it creates the directory, but the permissions are set wrong and even when I set them right, it's still a hidden directory. Here's what I'm doing, can anyone see what's wrong:
char tempdir[255] = "/my_users/temp/";
mode_t stat_mode;
stat_mode = umask(S_IWGRP|S_IRWXO);
if(mkdir(tempdir, S_IRWXU|S_IRWXG|S_IRWXO))
return(1); // problem //
return(0); // went fine //
I've tried many things, even creating the directory before the program is run, then using stat to get the permissions.
Thanks
M
char tempdir[255] = "/my_users/temp/";
mode_t stat_mode;
stat_mode = umask(S_IWGRP|S_IRWXO);
if(mkdir(tempdir, S_IRWXU|S_IRWXG|S_IRWXO))
return(1); // problem //
return(0); // went fine //
I've tried many things, even creating the directory before the program is run, then using stat to get the permissions.
Thanks
M