Easy way to change FTP directory permissions with LFTP chmod

Sometimes there is a necessity to change directory permissions on remote FTP host. It is okay if this is needed for 1-2 folders, but what if there are hundreds of them? In my case it was even worse, it was tree of folders, with sub- and  sub-sub-folders inside, kind of image cache!

At first I was little frustrated, because I did not know they way how to do it. Short after I read a man of my favorite and powerful ftp tool called lftp. It must  be able to do it, because it can do much more like deploying project via ftp.

Here is simple example of recursive remote ftp directory chmod

It will set  777 (read/write for all) permissions for cache folder and all sub-folders (files too).

Just one command makes life easier!

 

1 comment

Leave a Reply

Your email address will not be published.