You usually have to give the directory you are trying to mkdir in 777 permissions, that way 'nobody', or whoever php runs as, can have access to create directories. The directories created by PHP will also be owned by PHP. so if you don't make them 777, you won't be able to delete them as a basic user.
---John Holmes...