the folder where you are trying to create folders or place files needs to have read, write, and execute permissions for whatever user or group your server is running as.
For instance, on some machines I work with, the apache server is considered to be user 'apache'. on others, it's 'www-data'.
suppose i am user10 (this is my ftp and shell account username). On linux, I can list all my files by logging in to the server through shell access and typing:
ls -l
which indicates that all my files are owned by user10 and have user10 as their group. like this:
drwxrwxr-x 2 user10 user10 4096 Jul 1 22:30 cgi-bin
drwxr-xr-x 3 user10 user10 4096 Jul 6 00:30 log
drwxr-xr-x 2 user10 user10 4096 Jul 1 22:30 ssl
drwxr-xr-x 3 user10 user10 4096 Jul 5 18:26 user
drwxrwxr-x 9 user10 user10 4096 Jul 15 23:13 web
If i wanted php to be able to write the folder called 'user', i would need to set apache as its group and make sure the folder was readable, writable, and executable not just by its owner but also its group. so i change its ownership:
chown user10.apache user
and i set its permissions like this
chmod 775 user
NOTE: You may or may not be able to change file ownership or permissions on your server depending on whether you have root level access or whatever. if you can't do it yourself, ask your sysadmin to do it.