I was looking for a way to change the working directory, but did not find anything.
What ultimately worked for me was to include the folder in CURLOPT_URL. Also, folders alone are not enough; I had to include backslashes /.
, , , , URL- CURLOPT_FTPLISTONLY bussys/.
curl_setopt($ch, CURLOPT_URL, 'ftp://ftp.microsoft.com/bussys/');
curl_setopt($ch, CURLOPT_FTPLISTONLY, TRUE);
CURLOPT_POSTQUOTE CWD, .
user2379294