note 3218 modified in mkdir by ronabop

From: Date: Wed, 06 Sep 2000 06:02:14 +0000
Subject: note 3218 modified in mkdir by ronabop
Groups: php.notes 
Request: Send a blank email to php-notes+get-4203@lists.php.net to get a copy of this message
I had a permissions problem, and couldn't figure out what was actually being set where, but this code actually works to get the directory permissions set to rwxrwxr-x: <pre> $oldumask = umask(); umask(002); mkdir("$dirname",0777); umask($oldumask); </pre> <p> I'm not sure why it works, but I'll guess that umask(002) gets the umask set to 002 like I wanted, and having 777 on the mkdir means that you don't want to change the current umask. http://www.php.net/manual/function.mkdir.php

« previous php.notes (#4203) next »