hi
I'd rather not leave a directory's permissions set to 777.
Does PHP have the ability to chmod the directory for me, every time I want to upload a file? Can the PHP chmod($filename, XXXX) be used or adapted for this purpose?
thanks
Yes that is correct.. you can use
chmod ($file, XXXX);
.. if you wanted to write something to that particular directory you could use:
chmod ($file, 0777);
and then once the file has been writen to the directory use:
chmod ($file, 0755);
Hope it helps..
The problem is, that PHP in most cases does not have the priveleges to chmod directories. Espacially on "cheap webspaces" (sadly, that often does not mean, that they do not cost a fortune 🙁).