I've written a script to create a directory if it doesn't exist, and then upload one or more image files into it. Here's the snippet in question:
umask ( 0000 );
if (! file_exists ( $dest ) && ! mkdir ( $dest, 0775 ) ) error ( "Could not create unique images directory for article." );
umask ( 0002 );
copy ( $source, "$dest/$name" );
So first of all I create the directory with 775 permissions, then copy the image with the same permissions ( using umask() ).
The problem is, I can't edit/delete the files uploaded. Even via FTP, where I get 550 permission denied.
Any ideas? Cheers in advance.