Hi, I am having a hard time dealing with Mac OS X and ISP File permissions.
Thanks to (neale-php@woozle.org) the file/folder permission it is clear to me:
"x" is the low bit, so "--x" would just be 1.
"w" is the middle bit, "-w-" is 2.
"r" is the high bit, "r--" is 4.
For "r-x", add 1 and 4 for 5. "rwx" is 7.
With this in mind...
<?PHP
$main_dir = "clnt_prj";
$pathext = "/";
$new_sub_dir = "newsubdir";
$make_new_dir = @mkdir($main_dir.$pathext.$new_sub_dir,0766);
if ($make_new_dir == true) {
// $change = chmod($main_dir.$pathext.$new_sub_dir,0777); // ALT.
$msg = "The new $new_sub_dir directory was created successfully.";
}
else {
$msg = "The folder could not be created. Check permisions.";
}
print $msg;
?>
The Mac OS X result is the "newsubdir" folder with "d rwx r-- ---" permissions which is supposed to be "d rwx rw- rw-"... mmm
I used "$change = chmod($main_dir.$pathext.$new_sub_dir,0777);" to force things and it does the job... I know use 0766 for security reasons, but it does not work.
When I test the script on the ISP server, I can not make the folder,
called ISP Tech guys (great service) and everything points to the script?
What'ts going on... ? any ideas?
Thanks for the help,
carlos-lema