Chmod syntax in FTP client in all subdirectories
As the answer from @Ken G suggests, this will most likely be the question "what the FTP server supports".
I tried ncftp (runs under Cygwin on Win XP) against Sun FTP running on Solaris 10 (where chmod -R
o / s is supported chmod
). I got the error:
ncftp /work1/jleffler/tmp > chmod -R g+x *
chmod g+x: server said: 'SITE CHMOD -R g+x': command not understood.
chmod *: server said: 'SITE CHMOD -R xx.pl': command not understood.
ncftp /work1/jleffler/tmp >
My suspicion is that few, if any, systems make things easier. It's worth checking if the NCFTP server helps.
source to share
LFTP allows recursive CHMOD if the client allows it. You can do this by logging in with LFTP from the Unix / Linux CLI and then running the following:
chmod -R 0755 /www/directory/*
You can also set up a real nifty Bash script to do this:
#!/bin/bash
lftp <<EOF
set ftp:ssl-allow no
set ftp:passive-mode true
set ftp:list-options -a
open -u [user],[password] [host]
chmod -R 0777 /www/directory/*
EOF
Of course, LFTP does not distinguish between files and folders, to run this command only on files / folders, respectively, I would suggest using FileZilla. This allows this when running a command in a folder.
source to share