chmod recursive with lftp
lftp is a command line FTP program with several advanced options.
To chmod all files and folders inside a sub folder, you can use -R option.
chmod -R 777 modules
This will chmod all files and subfolders inside the folder “modules” to 777.
See lftp