I have trying to research this over at php.net and have posted on some other forums but all I ever get is that mkdir will not make the directory writeable, even though permissions reflect 777. The reason being:
So does anyone have any suggestions on how I can create directories using a script, and then make the dirs writable in order for files to be uploaded to that directory, all in safe-mode?Beware that when in safe mode, mkdir creates folders with apache's UID, though the files you create in them are of your script's UID (usually the same as your FTP uid).
What this means is that if you create a folder, you won't be able to remove it, nor to remove any of the files you've created in it (because those operations require the UID to be the same).
Ideally mkdir should create the folder with the script's UID, but this has already been discussed and will not be fixed in the near future.
In the meantime, I would advice NOT to user mkdir in safe mode, as you may end up with folders you can't remove/use.
Any suggestions will be greatly appreciated.