Hello,
I have a server running php 5.2.4 with CGI as Server API and suexec, but scripts cant create dirs in php with chmod 755. When I use mkdir("/home/user/public_html/$dirname", 0755); it creates the dir with chmod 744. Why?
I can change later this chmod to 755 in php with the chmod function. But why my server doesnt allow the directory to be created as 755? Where can I configure it?
Let me clarify my problem:
Script 1 (Should create a dir with chmod 755. But creates it with chmod 744.):
<?
//some code
mkdir("/home/user/public_html/$dirname", 0755); //Create with chmod 744 ;/ That´s not what I want
?>
Script 2 (Works fine):
<?
//some code
mkdir("/home/user/public_html/$dirname", 0755); // Creates with 744 ;/ That´s not what I want
chmod ("/home/user/public_html/$dirname", 0755); // Correct this weird bug
?>
Script 3 (works fine also):
<?php
//some code
umask(0022);
mkdir("/home/linuxsvr/public_html/$dirname", 0755); //Create with chmod 755 ;D
?>
m1k33



LinkBack URL
About LinkBacks
Reply With Quote





