What permissions should be set when creating a new directory in PHP to ensure it can be deleted using FTP programs like WS_FTP?

When creating a new directory in PHP, you should set the permissions to 0777 to ensure that it can be deleted using FTP programs like WS_FTP. This permission setting allows for full access to the directory, including read, write, and execute permissions for the owner, group, and others.

$directory = 'new_directory';
mkdir($directory, 0777);