Using interactive session I discovered that FTP cd command (protocol level CWD) does not work anymore. The following code doesn't work any more :
send -- "passive\r"
send -- "cd %DIR%\r"
send "put %FILE%\r"
ftp> cd test
250 CWD command succcessful. New CWD is </test>
ftp> cd timur
550 /pnfs/fnal.gov/usr/timur: Not a directory
ftp> pwd
257 "/" is current directory
ftp> cd test
250 CWD command succcessful. New CWD is </test>
ftp> pwd
257 "/" is current directory
ftp> cd test
250 CWD command succcessful. New CWD is </test>
ftp> pwd
257 "/" is current directory
Trying the dir for reading and writing files does indeed shows that current directory is always "Root".