Ajouve
Ajouve

Reputation: 10089

OS X - php - mkdir() - wrong chmod

I'm trying to create a folder using php on os x

for exemple:

mkdir('test','0644',true);

and ls -l returns:

d-w----r--  2 ant  staff  68 16 nov 11:27 test

an other

mkdir('test','0777',true);

and ls -l returns:

dr----x--x  2 ant  staff  68 16 nov 11:33 test

I don't understand why I didn't have the corrects rights on the folder Thanks for your help.

Upvotes: 1

Views: 187

Answers (1)

jko
jko

Reputation: 2098

mkdir() uses $mode as an integer.
read: https://www.php.net/mkdir

Upvotes: 2

Related Questions