Module 4 File upload error

When downloading a file using script there is successful file transfer between ftp_server and client however when uploading the same file I get following error.
553 Could not create file.

You can use this link as a reference.