What potential issues can arise when creating folders with PHP for FTP access?

One potential issue that can arise when creating folders with PHP for FTP access is incorrect permissions being set on the newly created folders, which can result in access denied errors. To solve this issue, you can explicitly set the correct permissions on the folders using the `ftp_chmod()` function after creating them.

// Connect to FTP server
$ftp_server = 'ftp.example.com';
$ftp_username = 'username';
$ftp_password = 'password';
$conn_id = ftp_connect($ftp_server);
ftp_login($conn_id, $ftp_username, $ftp_password);

// Create a new folder
$folder_name = 'new_folder';
ftp_mkdir($conn_id, $folder_name);

// Set correct permissions on the new folder
ftp_chmod($conn_id, 0777, $folder_name);

// Close FTP connection
ftp_close($conn_id);